[issue2226] Small _abcoll Bugs / Oddities

Armin Ronacher report at bugs.python.org
Mon Mar 3 22:25:01 CET 2008


New submission from Armin Ronacher:

_abcoll.py references intertools.chain but doesn't import it.  This
breaks Set subclasses.  Additionally the abstract base classes don't
provide the right hand operator callbacks or how you want to call them.
 So __add__ is there but __radd__ not which for example leads to the
problem that "foo() + set()" works but "set() + foo" not.

And the third oddity in that module is that Callable defines an abstract
method for __contains__ which makes no sense but none for __call__.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2226>
__________________________________


More information about the Python-bugs-list mailing list