
July 31, 2020
9:53 p.m.
On Fri, 31 Jul 2020 at 22:14, Chris Angelico <rosuav@gmail.com> wrote:
So, constructing a tuple or list from the keys or items WILL give you a sequence.
Yes. Since now dicts are ordered by insertion, also keys, values and items are ordered the same way. It seems to me more simple to add some sequence methods to dict views, like subscript, slicing and index(), instead of creating other 3 methods and 3 data types. What I have not understood well is when you need to index a dict by position or slice it.