[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

Daniel Stutzbach report at bugs.python.org
Fri Jul 9 21:03:37 CEST 2010


New submission from Daniel Stutzbach <daniel at stutzbachenterprises.com>:

>>> isinstance({}.keys(), collections.Set)
True
>>> [method for method in set(dir(collections.Set)) - set(dir({}.keys()))
...  if not method.startswith('_')]
['isdisjoint']

(in Python 2.7, use "viewkeys()" instead of "keys")

dict_items has the same problem.

----------
assignee: stutzbach
components: Interpreter Core
messages: 109783
nosy: stutzbach
priority: normal
severity: normal
stage: unit test needed
status: open
title: dict_keys purports to implement the Set ABC, but is missing the isdisjoint method
versions: Python 2.7, Python 3.1, Python 3.2

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


More information about the Python-bugs-list mailing list