[Zope-dev] Re: Acquisition in Python2.5
Tres Seaver
tseaver at palladion.com
Mon Jan 21 18:31:47 EST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tres Seaver wrote:
> Hanno Schlichting wrote:
>
>> Two wrappers compare equal, so the code comparing an AQ wrapper with
>> something different should be the one with the problem. I'd look into
>> Wrapper_compare in _Acquisition.c.
>
> Under 2.5, that function isn't even called during the test. QED.
Crap. The Python maintainers decided to disallow heteragenous
comparisons in C code:
- http://mail.python.org/pipermail/patches/2004-December/016607.html
which led to:
-
http://svn.python.org/view/python/trunk/Objects/object.c?r1=37435&r2=38113
It looks as though the only way out is to implement rich comparison
semantics (Python's 'do_cmp' prefers 'tp_richcompare' to 'tp_compare').
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHlStj+gerLs4ltQ4RAqDIAJwIL+1uEucXDOIFGJtsP6jP7khIqACeLV95
uf4ytGpv3fuUWO0gqx2vNhs=
=yFps
-----END PGP SIGNATURE-----
More information about the Zope-Dev
mailing list