[Python-checkins] r43711 - peps/trunk/pep-3000.txt
guido.van.rossum
python-checkins at python.org
Thu Apr 6 20:03:49 CEST 2006
Author: guido.van.rossum
Date: Thu Apr 6 20:03:49 2006
New Revision: 43711
Modified:
peps/trunk/pep-3000.txt
Log:
Add suggestion by Doug Landauer -- use an instrumented Python 2.x to find
future problems.
Modified: peps/trunk/pep-3000.txt
==============================================================================
--- peps/trunk/pep-3000.txt (original)
+++ peps/trunk/pep-3000.txt Thu Apr 6 20:03:49 2006
@@ -72,9 +72,10 @@
We need a meta-PEP to describe the compatibility requirements. Python
3000 will break backwards compatibility. There is no requirement that
-Python 2.9 code will run unmodified on Python 3.0. I'm not sure
-whether it is reasonable to require that Python 2.x code can be
-mechanically translated to equivalent Python 3.0 code; Python's
+Python 2.9 code will run unmodified on Python 3.0.
+
+I'm not sure whether it is reasonable to require that Python 2.x code
+can be mechanically translated to equivalent Python 3.0 code; Python's
dynamic typing combined with the plans to change the semantics of
certain methods of dictionaries, for example, would make this task
really hard. However, it would be great if there was some tool that
@@ -82,6 +83,15 @@
wasn't sure using comments or warnings. Perhaps such a tool could be
based on something like Pychecker.
+Another kind of tool could be an instrumented version of 2.x which
+produces run-time warnings about constructs that will get a different
+meaning in 3.0. This can't be used for all incompatibilities, but
+it's likely to help reach a larger percentage of correct translations.
+(This approach is already in place for detecting reliance on '/' to do
+integer division; see Tools/scripts/fixdiv.py, which finds occurrences
+of int/int and long/long that were flagged by running your program
+with -Qwarnall.)
+
Meta-Contributions
==================
More information about the Python-checkins
mailing list