Inconsistent viewkeys behaviour

Joshua Landau joshua at landau.ws
Mon Apr 28 02:22:52 EDT 2014


Is there any reference for this strange behaviour on Python 2:

    >>> set() < dict().viewkeys()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: can only compare to a set
    >>> dict().viewkeys() > set()
    False

?



More information about the Python-list mailing list