On Wed, Oct 3, 2018 at 6:49 PM Anders Hovmöller <bo...@killingar.net> wrote: > > I don't really think accidents of implementation are different from hard > requirements in Python, as it applies to alternative implementations. In > practice if it deviates from CPython then it's broken. There is no language > spec, there is only CPython. This has been the experience and approach of > PyPy as far as I've understood it after having followed their blog over the > years. >
Definitely not true. There have been times when other implementors have come to python-dev and said, hey, is this part of the spec or is it an implementation detail? And the answer determines whether they care about that or not. For just a few examples: 1) Reference counting vs nondeterministic garbage collection 2) O(1) indexing/slicing of Unicode strings 3) "\N{...}" string escapes (okay, that's standardized, but optional) 4) Reuse of id() values 5) The "slots" mechanism for dunder method lookup The language spec determines, in some cases, that a CPython implementation detail has been promoted to standard. More often, it determines that other Pythons are permitted to behave differently. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/