[Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered (original) (raw)
Sven R. Kunze srkunze at mail.de
Sun Sep 11 16:50:12 EDT 2016
- Previous message (by thread): [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered
- Next message (by thread): [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 11.09.2016 01:41, Nathaniel Smith wrote:
I feel like I'm missing something here... by this reasoning, we should never change the language spec when new features are added. E.g. if people use async/await in 3.5 then their code won't be compatible with 3.4, but async/await are still part of the language spec. And in any case, the distinction between "CPython feature" and "Python language-spec-guaranteed feature" is extremely arcane and inside-basebally -- it seems really unlikely that most users will even understand what this distinction means, never mind let it stop them from writing CPython-and-PyPy-specific code. Emphasizing that this is a new feature that only exists in 3.6+ of course makes sense, I just don't understand why that affects the language spec bit.
(OTOH it doesn't matter that much anyway... the language spec is definitely a useful thing, but it's largely aspirational in practice -- other implementations target CPython compatibility more than they target language spec compatibility.)
The new dict has thousands and one advantages: no need to import OrderDict anymore, standard syntax for OrderDict, etc.
People will love it. But is it legal to use? I tend to agree with you here and say "CPython mostly is the living spec" but I'm not 100% sure (I even restrain from writing a blog post about it although it so wonderful).
Cheers, Sven
- Previous message (by thread): [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered
- Next message (by thread): [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]