[issue8743] set() operators don't work with collections.Set instances

Daniel Stutzbach report at bugs.python.org
Mon May 17 21:01:20 CEST 2010


Daniel Stutzbach <daniel at stutzbachenterprises.com> added the comment:

I should add:

I discovered the inconsistency while working on my sortedset class, which provides the same interface as set() but is also indexable like a list (e.g., S[0] always returns the minimum element, S[-1] returns the maximum element, etc.).

sortedset derives from collections.MutableSet, but it's challenging to precisely emulate set() when collections.MutableSet and set() don't work the same way. ;-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8743>
_______________________________________


More information about the Python-bugs-list mailing list