Eric Brunson <[EMAIL PROTECTED]> wrote: Allen Fowler wrote:
> I seem to be having an issue with __getattr__() being called even if
> the proporite already exists... I thought that this was not supposed
> to happen.
I think you've misunderstood. __getattr__() should always be called, it
allows you to intercept and reimplement the behavior of a attribute
lookup to suit your needs. Typically, my __getattrs__() look like this:
See:
http://docs.python.org/ref/attribute-access.html
This would lead me to think not that way...
"Note that if the attribute is found through the normal mechanism,
__getattr__() is not called. (This is an intentional asymmetry between
__getattr__() and __setattr__().) This is done both for efficiency reasons and
because otherwise __setattr__() would have no way to access other attributes of
the instance."
---------------------------------
Building a website is a piece of cake.
Yahoo! Small Business gives you all the tools to get online.
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor