[issue23161] collections.abc.MutableSet missing methods
Martin Panter
report at bugs.python.org
Sun Jan 4 13:50:10 CET 2015
Martin Panter added the comment:
For what it’s worth, every now and then I have to stop and remember that I can’t do this sort of thing:
unsupported_keys = config_dict.keys().difference(supported_list)
though it is not a big problem to rewrite it as
unsupported_keys = config_dict.keys() - set(supported_list)
Also it looks like one can already effectively do x.copy() using the existing immutable Set operators, so that worm can is already opened:
>>> ListBasedSet("abc") & ListBasedSet("abc")
<__main__.ListBasedSet object at 0x7f419951b860>
On the other hand, a matching almost equivalent operator does exist for a.issubset(b): a <= b, or a.__le__(b).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23161>
_______________________________________
More information about the Python-bugs-list
mailing list