|
|
|
|
|
by maweki
1688 days ago
|
|
PEP 394 (which is now superseeded) clearly states that "python" shall invoke python2 and not python3 https://www.python.org/dev/peps/pep-0394/ "The python command should always invoke Python 2 (to prevent hard-to-diagnose errors when Python 2 code is run on Python 3)." So there was indeed a time where the mentioned scenario was possible. Edit: love those people who got to downvote reality. At no point was python pointing to either 2 or 3 will-nilly, but there was always a PEP specifying best practice behaviour. |
|
The current version of PEP 394 says:
] If the python command is installed, it is expected to invoke either the same version of Python as the python3 command or as the python2 command.
] Distributors may choose to set the behavior of the python command as follows:
The part you quoted is from the section "History of this PEP". Just before your quoted text is:] This PEP originally provided a very simple mechanism ...
and just after it is:
] However, these recommendations implicitly assumed that Python 2 would always be available.
This historic advice is no longer recommended.
The change was made on July 5, 2019 - https://github.com/python/peps/commit/ae932bd6fd2c493d7d64ce... .