On 10 Jul 2020, at 05:33, Christopher Barker firstname.lastname@example.org wrote:
On Thu, Jul 9, 2020 at 10:29 AM Stestagg <email@example.com mailto:firstname.lastname@example.org> 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.