[issue16373] Recursion error comparing set() and MutableMapping.keys()

Serhiy Storchaka report at bugs.python.org
Wed Oct 31 16:46:04 CET 2012


Serhiy Storchaka added the comment:

The core of the problem is in Set.

import collections.abc
class S(collections.abc.Set):
    def __contains__(self, key): return False
    def __iter__(self): return iter(())
    def __len__(self): return 0

S() < set() is False.
set() < S() fails.

----------

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


More information about the Python-bugs-list mailing list