27 May
2005
27 May
'05
11:58 a.m.
Paul Winkler <pw_lists@slinkp.com> 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 fg@nuxeo.com