[issue32467] dict_values isn't considered a Collection nor a Container

2018-01-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32467] dict_values isn't considered a Collection nor a Container

2018-01-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 02556fbade5e1e864dd09d5768a8dbbf5b3a0dac by Raymond Hettinger in branch 'master': bpo-32467: Let collections.abc.ValuesView inherit from Collection (#5152) https://github.com/python/cpython/commit/02556fbade5e1e864dd09d5768a8dbbf5b3a0dac ---

[issue32467] dict_values isn't considered a Collection nor a Container

2018-01-11 Thread Yahya Abou Imran
Yahya Abou Imran added the comment: Perfect for me. I was about to submit about the same patch as yours after your acceptation; but it's better that way, it's your module! Thanks Raymond. -- ___ Python tracker _

[issue32467] dict_values isn't considered a Collection nor a Container

2018-01-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +5007 stage: -> patch review ___ Python tracker ___ ___ Python-bugs

[issue32467] dict_values isn't considered a Collection nor a Container

2018-01-11 Thread Raymond Hettinger
Raymond Hettinger 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 (a

[issue32467] dict_values isn't considered a Collection nor a Container

2017-12-31 Thread Yahya Abou Imran
New submission from Yahya Abou Imran : a `dict_values` instance behaves like a Collection (a Sized Iterable Container): >>> values = {1: 'one', 2: 'two'}.values() >>> 'two' in values True >>> 'three' in values False >>> for value in values: print(value) one two >>> len(values) 2 But... >>> isi