Commit 86e5b1de authored by Tres Seaver's avatar Tres Seaver

Work around lack of '__objclass__' on instance methods in PyPy3.

parent 8af9222d
......@@ -209,6 +209,10 @@ class _SetIteration(object):
def _no_default_comparison(key):
# Enforce test that key has non-default comparison.
if key is None:
raise TypeError("Can't use None as a key")
if type(key) is object:
raise TypeError("Can't use object() as keys")
lt = getattr(key, '__lt__', None)
if lt is not None:
if getattr(lt, '__objclass__', None) is object: #pragma NO COVER Py3k
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment