durusmail: durus-users: __setattr__ RuntimeError: max recursion depth exceeded
__setattr__ RuntimeError: max recursion depth exceeded
2004-10-15
Mario Ruggier (2 parts)
__setattr__ RuntimeError: max recursion depth exceeded
2004-10-15
2004-10-15
2004-10-15
2004-10-15
2004-10-15
2004-10-15
__setattr__ RuntimeError: max recursion depth exceeded
Mario Ruggier
2004-10-15
On Oct 15, 2004, at 9:26 PM, David Binger wrote:
> On Oct 15, 2004, at 3:20 PM, Mario Ruggier wrote:
>>
>> Fair enough. I do certainly appreciate the current clarity of the
>> code.... i would not have minded at all if I knew not to redefine
>> __setattr__, or not to access class variables via self. With some
>> documentation, and maybe catching of the exception, I would also
>> agree to call it a reasonable restriction but, as it is,
>
> Accessing class variables via self is fine in general.
> The restriction is that you can't access self.anything
> in *your* __setattr__() before the Persistent.__setattr__()
> gets called.

Ah, thanks, that's a nice concise description of the so-called
restriction. Is it possible to stick that in a gotchas section
somewhere? The readme will be perfectly fine...

mario


reply