[Zope3-Users] Infinite recursion when storing FieldProperties in
as annotations (using IAttributeAnnotations).
srichter at cosmos.phy.tufts.edu
Mon Aug 29 11:32:01 EDT 2005
On Monday 29 August 2005 11:26, Alec Munro wrote:
> Thanks, it seemed to work, once I realized that I was creating another
> infinite recursion when it accessed self.mapping. Also, apparently
> __getattr__ is actually __getattribute__. I'll do a little more
> experimentation, but I think it I've got what I need.
No, they are not the same. __getattr__ is only called, if an attribute lookup
failed. So simply have in your class definition "mapping = None", so that the
mapping lookup does not fail. __getattribute__ id *always* used for attribute
lookup and is pretty slow, so you should not use it (at least not in this
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-users