Movatterモバイル変換
[0]ホーム
[Python-Dev] Guarantee ordered dict literals in v3.7?
Nathaniel Smithnjs at pobox.com
Tue Nov 7 15:05:50 EST 2017
On Nov 7, 2017 12:02 PM, "Barry Warsaw" <barry at python.org> wrote:On Nov 7, 2017, at 09:39, Paul Sokolovsky <pmiscml at gmail.com> wrote:> So, the problem is that there's no "Python language spec”.There is a language specification:https://docs.python.org/3/reference/index.htmlBut there are still corners that are undocumented, or topics that aredeliberately left as implementation details.Also, specs don't mean that much unless there are multiple implementationsin widespread use. In JS the spec matters because it describes the commonsubset of the language you can expect to see across browsers, and lets thebrowser vendors coordinate on future changes. Since users actually targetand test against multiple implementations, this is useful. In python,CPython's dominance means that most libraries are written against CPython'sbehavior instead of the spec, and alternative implementations generallydon't care about the spec, they care about whether they can run the codetheir users want to run. So PyPy has found that for their purposes, thepython spec includes all kinds of obscure internal implementation detailslike CPython's static type/heap type distinction, the exact tricks CPythonuses to optimize local variable access, the CPython C API, etc. The Pystondevs found that for their purposes, refcounting actually was a mandatorypart of the python language. Jython, MicroPython, etc make a different setof compatibility tradeoffs again.I'm not saying the spec is useless, but it's not magic either. It onlymatters to the extent that it solves some problem for people.-n-------------- next part --------------An HTML attachment was scrubbed...URL: <http://mail.python.org/pipermail/python-dev/attachments/20171107/ccb65dd0/attachment-0001.html>
More information about the Python-Devmailing list
[8]ページ先頭