Seite 1 von 1

__setattr__???

Verfasst: Sonntag 19. Juni 2005, 19:38
von john
hi all,

i have overwritten the __setattr__() function in my class, but the code inside this function is called whenever an instance of my class is created. does it really work like this??

the problem is i want __setattr__ be called only when an attribute assignment is attempted.

any one can help me? thanks a lot in advance!

john

Verfasst: Sonntag 19. Juni 2005, 19:48
von mawe
Hi!

Could you please show us your code (at least some relevant parts). Without this it's hard to help you ;)

Regards, mawe