[issue31905] IPv4Networkcontains raises exception on None

Serhiy Storchaka report at bugs.python.org
Tue Oct 31 03:07:05 EDT 2017


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I concur. IPvNetwork is not a general purposed collection. And even genera purposed collections can have restrictions on the arguments of "in". E.g.:

>>> [] in {}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'list'

Similar issue already was raised (maybe not for IPvNetwork, but for other class supporting the "in" operator) and was closed with the same arguments.

----------
nosy: +serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31905>
_______________________________________


More information about the Python-bugs-list mailing list