Message309795
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. |
|
Date |
User |
Action |
Args |
2018-01-11 08:35:05 | rhettinger | set | recipients:
+ rhettinger, yahya-abou-imran |
2018-01-11 08:35:05 | rhettinger | set | messageid: <1515659705.79.0.467229070634.issue32467@psf.upfronthosting.co.za> |
2018-01-11 08:35:05 | rhettinger | link | issue32467 messages |
2018-01-11 08:35:05 | rhettinger | create | |
|