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

2004-06-07 Thread Casey Duncan
On Mon, 7 Jun 2004 07:46:41 +0200 Dieter Maurer [EMAIL PROTECTED] 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

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

2004-06-07 Thread Dieter Maurer
Casey Duncan wrote at 2004-6-7 09:16 -0400: On Mon, 7 Jun 2004 07:46:41 +0200 Dieter Maurer [EMAIL PROTECTED] 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,