> Are they class attributes - shared by all instances of the class or are
> they instance attributes - unique values in each instance?
all instances of the class share these attributes.
> So you have a list of all the instances of the class and modifying values.
> Since you do it on a per insta
> I have a class with attributes
Are they class attributes - shared by all instances of the class or are
they instance attributes - unique values in each instance?
> I am now going back through my object list of that
> class
So you have a list of all the instances of the class and modifying val
Eric Walker wrote:
> ahh, you just blew smoke in my face. :)
>
> I have a class with attributes. These attributes eventually have the value of
> some lines in a file. I am now going back through my object list of that
> class and assigning values to the attributes depending on another variable
ahh, you just blew smoke in my face. :)
I have a class with attributes. These attributes eventually have the value of
some lines in a file. I am now going back through my object list of that
class and assigning values to the attributes depending on another variable
that will change and be the s
> markersExp = ['big','boss','two','three']
> for mark in markersExp:
> print y.mark
>
> Now I have an list of class objects that are in an outerloop. y is how I
> access it. The attributes names of the class objects match whats in
> markersExp.
Do you have to use string versions of the cl
Eric Walker wrote:
> Hello,
> If I have some like the following:
>
> markersExp = ['big','boss','two','three']
> for mark in markersExp:
> print y.mark
>
> Now I have an list of class objects that are in an outerloop. y is how I
> access it. The attributes names of the class objects match w
Am Samstag, den 05.11.2005, 22:30 +0100 schrieb Jan Eden:
> Hi,
>
> I use the following construction to make sure the data attribute site_id is
> set only once for each object:
>
> def GetSiteID(self):
> return self._site_id
>
> def SetSiteID(self, value):
> if not (hasattr(self, '_site
Hi Liam,
Liam Clarke wrote on 06.11.2005:
>Hi Jan,
>
>Won't this
>
>site_id = property(GetSiteID, SetSiteID)
>
>and this
>
>site_id = 1
>
>collide?
>
Yup. After writing my message, I thought about it again: the property function
gets never executed when I use the class attribute.
So I changed
Hi Jan,
Won't this
site_id = property(GetSiteID, SetSiteID)
and this
site_id = 1
collide?
On 11/6/05, Jan Eden <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I use the following construction to make sure the data attribute site_id is
> set only once for each object:
>
> def GetSiteID(self):
> retu