[Zope] Finding an object in a folder

Dieter Maurer dieter at handshake.de
Fri May 27 09:31:34 EDT 2005


Paul Winkler wrote at 2005-5-27 05:07 -0400:
> ...
>What's wrong with a tuple? There's no reason to mutate the marker. 

The Python spec allows implementations to identify immutable objects
with the same value. Thus, in principle, two "()" created
at different times can in fact be the same object.
This would violate our use as a marker.

Python specifies that mutable objects created at different times
are garanteed to be different (as long as both exist).
Therefore, you can use them safely as markers.

-- 
Dieter


More information about the Zope mailing list