Paul Winkler <[EMAIL PROTECTED]> wrote: > On Fri, May 27, 2005 at 08:51:58AM +0100, Chris Withers wrote: > > Paul Winkler wrote: > > > > >marker = () > > >if getattr(some_object, marker) is not marker: > > > > For good measure, I wonder if that should be a [], no a ()? > > What's wrong with a tuple? There's no reason to mutate the marker.
The whole point of a marker is that it is unique, so cannot be confused with a legitimate value of the object examined. And all empty tuples are equal. In python 2.3, the idiom most commonly found is to use marker = object(). Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )