[Zope3-dev] Big Problem with FTP in Zope 3.3.0, seems to be the result of using `v = self.get(name, self); if v is self...` in a land where Proxy objects can kill identity comparison

Benji York benji at zope.com
Tue Oct 31 17:01:29 EST 2006


Jeff Shell wrote:
[lots of stuff I don't know much about, so I won't comment on]
> Is there any reason why the ``_marker = object() .... get(...,
> default=_marker)`` paradigm isn't used?
> 
> After encountering this, I am rather uneasy about the number of places
> in which I see this "self as default marker check" paradigm. My
> biggest unease comes from not knowing proxies and when things are
> proxied and when they're not and when I have to be careful about them
> and when I don't.

I like the "marker" flavor of the pattern better too, but for a 
different reason.  When I see something in the second argument to the 
get, I don't know if it's /really/ the default, or if it's just being 
used as a placeholder so I have to investigate to find out.  I prefer 
the more explicit version.
-- 
Benji York
Senior Software Engineer
Zope Corporation


More information about the Zope3-dev mailing list