Re: [Python-ideas] Change the __repr__ of the `MappingView`s

2017-12-30 Thread Guido van Rossum
You're right that there's some inconsistency here. But I don't think it's worth fixing given that the fix would introduce another inconsistency (which you pointed out) and would also risk breaking backwards compatibility. I think this ship has sailed. On Sat, Dec 30, 2017 at 5:18 PM, Yahya Abou

[Python-ideas] Change the __repr__ of the `MappingView`s

2017-12-30 Thread Yahya Abou 'Imran via Python-ideas
=== This proposition is purely aesthetic === At this time, the __repr__ of the mapping views is showing the whole mapping: >>> from collections.abc import ValuesView, KeysView, ItemsView >>> d = {3: 'three', 4: 'four'} >>> KeysView(d) KeysView({3: 'three', 4: 'four'}) >>> ValuesView(d)