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
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_id') and self._site_id): self._site_id = value
site_id = property(GetSit