> On 10 Jul 2020, at 05:33, Christopher Barker <[email protected]> wrote: > > On Thu, Jul 9, 2020 at 10:29 AM Stestagg <[email protected] > <mailto:[email protected]>> wrote: > The idea that there are future, unspecified changes to dicts() that may or > may not be hampered by allowing indexing sounds like FUD to me, unless there > are concrete references? > > IIRC, first, dicts started preserving order as an implementation detail > (implementation borrowed from PyPy?). Then there was a discussion about > whether it should be declared that it was a feature that could be counted on > -- and it was decided that yes, it was. > > So yes -- we can count on it, and so don't be worried about a future > re-implementation.
Adding indexing to views adds another requirement to the dict implementation: indexing for sequences at least suggests that access is O(1). That makes it impossible to use, as an example, a linked list to preserve insertion order. Ronald — Twitter / micro.blog: @ronaldoussoren Blog: https://blog.ronaldoussoren.net/ <https://blog.ronaldoussoren.net/>
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/EYFZSDWMYTO2JVX3CWKG6WWI6EQQYGBY/ Code of Conduct: http://python.org/psf/codeofconduct/
