[Python-checkins] r88755 - peps/trunk/pep-0394.txt

nick.coghlan python-checkins at python.org
Sat Mar 5 08:06:50 CET 2011


Author: nick.coghlan
Date: Sat Mar  5 08:06:50 2011
New Revision: 88755

Log:
Note that source compatible scripts may continue to refer to the version agnostic python command without affecting portability

Modified:
   peps/trunk/pep-0394.txt

Modified: peps/trunk/pep-0394.txt
==============================================================================
--- peps/trunk/pep-0394.txt	(original)
+++ peps/trunk/pep-0394.txt	Sat Mar  5 08:06:50 2011
@@ -48,6 +48,9 @@
   This distinction should be made in shebangs, when invoking from a shell
   script, when invoking via the system() call, or when invoking in any other
   context.
+* One exception to this is scripts that are deliberately written to be source
+  compatible with both Python 2.x and 3.x. Such scripts may continue to use
+  ``python`` on their shebang line without affecting their portability.
 * When reinvoking the interpreter from a Python script, querying
   ``sys.executable`` to avoid hardcoded assumptions regarding the
   interpreter location remains the preferred approach.


More information about the Python-checkins mailing list