[Python-Dev] Guarantee ordered dict literals in v3.7?
Steve Holden
steve at holdenweb.com
Mon Nov 6 06:18:50 EST 2017
On Mon, Nov 6, 2017 at 10:18 AM, Paul Sokolovsky <pmiscml at gmail.com> wrote:
> Hello,
>
> What happens now borders on technologic surrealism - the CPython, after
> many years of persuasion, switched its dict algorithm, rather
> inefficient in terms of memory, to something else, less inefficient
> (still quite inefficient, taking "no overhead" as the baseline). That
> algorithm randomly had another property. Now there's a seemingly
> serious talk of letting that property leak into the *language spec*,
> despite the fact that there can be unlimited number of dictionary
> algorithms, most of them not having that property.
>
>
I have to agree: I find the elevation of a CPython implementation detail to
a language feature somewhat hard to comprehend. Maybe it's more to do with
the way it's been presented, but this is hardly an enhancement the language
has been screaming for for years.
Presumably there is little concern that algorithms that rely on this
behaviour will be perfectly syntactically conformant with earlier versions
but will fail subtly and without explanation? It's a small concern, but a
real one - particularly for learners.
regards
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171106/ecf6d34f/attachment.html>
More information about the Python-Dev
mailing list