Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

It would be okay to let ValuesView inherit from Collection.

Am marking this a 3.7 only because it isn't important to anyone's actual code 
and there is no known use case.  Technically, it isn't even a bug.  The 
__contains__ method is supported implicitly (as it is for many classes that 
just define __iter__), so there is no requirement that this be recognized as a 
Collection.  Also, the existing behavior was explicitly tested (see line 848 in 
Lib/test/test_collections).

I'm going forward with this because it does offer a sense of neatness (in 
comparison to KeysView and ItemsView) and it might avoid a pedantic 
StackOverflow question somewhere down the line.

----------
assignee:  -> rhettinger
components: +Library (Lib)
nosy: +rhettinger
priority: normal -> low
versions:  -Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32467>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to