[Zope-dev] Re: Bad idiom to access optional attributes

Casey Duncan casey at zope.com
Mon Jun 7 09:16:23 EDT 2004


On Mon, 7 Jun 2004 07:46:41 +0200
Dieter Maurer <dieter at handshake.de> wrote:

[..]
> Meanwhile, the best way to access optional attributes seems to be
> 
>       if getattr(aq_base(obj), attrname, notFound) is not notFound:
>           attr = getattr(obj, attrname)
> 	  ...

Ahhh, the miracle of acqfuscation...

-Casey




More information about the Zope-Dev mailing list