On Fri, 31 Jul 2020 at 22:14, Chris Angelico <ros...@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.
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/YMXPFPXWOJXZXIYXC6ZX3KQQ2YFTERBD/ Code of Conduct: http://python.org/psf/codeofconduct/