4 ms·
Python doesn't have a standards document. It has a reference implementation that defines the language. IOW, the python implementation is the standard, and the
by lelanthran 3y ago
Python doesn't have a standards document. It has a reference implementation that defines the language.
IOW, the python implementation is the standard, and therefore any code that relies on an implementation detail in the reference implementation is, by definition, correct.
- oblvious-earth 3y ago> Python doesn't have a standards document. It has a reference implementation that defines the language. That's not quite strictly true, Python does have a documented "Language Reference": https://docs.python.org/3/reference/index.html https://docs.python.org/3/reference/index.html If there is a contradiction between the Language Reference and CPython then one, or both, of them needs to be updated and it's treated on a case by case basis. If an alternative Python implementation follows the Language Reference but chooses different details outside it, that doesn't stop it from being "Python". Of course practically speaking most alternative implementations are incentivized to closely follow CPython.
- solarkraft 3y agoAnd what about PEPs, which describe (in pretty good detail) what changes will be made?
- samus 3y agoThey describe large-scale changes that usually also lead to changes of implementation details. But their biggest disadvantage is that they are not kept up to date when things change due to later PEPs or smaller-scale changes interfering. After landing, they are of historical value only.