-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paul Winkler 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.
In Python, there is only empty tuple object, while each empty list is a distinct object. For use as a marker, the empty list can't return a false positive, while the empty tuple can. Tres. - -- =================================================================== Tres Seaver [EMAIL PROTECTED] Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFClw9J+gerLs4ltQ4RAtyCAJ4y+h+rDtSmo+Sa2n5K+h87z/24DwCgwBFY 9Wrhk9aGMBUPm1DxsOpewec= =O5re -----END PGP SIGNATURE----- _______________________________________________ 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 )