On Sun, Nov 05, 2017 at 01:14:54PM -0500, Paul G wrote: > I'm not entirely sure I understand the full set of reasoning for this - I > couldn't really tell what the problem with OrderedDict is from the link > Stefan provided. It seems to me like a kind of huge change for the language > to move from arbitrary-ordered to guaranteed-ordered dict. The problem I see > is that this introduces a huge backwards compatibility burden on all > implementations of Python.
Scientific applications want something like {'a': 10, 'b': "foo", 'c': {'this': b'123'}} as an ordered initializer for unboxed or typed (or both) data. In general, if dicts are ordered, they can be used for example as initializers for (nested) C structs. > 2. Someone invents a new arbitrary-ordered container that would improve on > the memory and/or CPU performance of the current dict implementation I would think this is very unlikely, given that the previous dict implementation has always been very fast. The new one is very fast, too. Stefan Krah _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com