[Python-checkins] r54308 - sandbox/trunk/2to3/README

collin.winter python-checkins at python.org
Mon Mar 12 22:01:46 CET 2007


Author: collin.winter
Date: Mon Mar 12 22:01:45 2007
New Revision: 54308

Modified:
   sandbox/trunk/2to3/README
Log:
Add a 'capabilities' section.

Modified: sandbox/trunk/2to3/README
==============================================================================
--- sandbox/trunk/2to3/README	(original)
+++ sandbox/trunk/2to3/README	Mon Mar 12 22:01:45 2007
@@ -26,6 +26,49 @@
 tests/         - Test files for pytree, fixers, grammar, etc
 
 
+Capabilities
+============
+
+A quick run-through of 2to3's current fixers:
+
+* **fix_apply** - convert apply() calls to real function calls.
+
+* **fix_dict** - fix up dict.keys(), .values(), .items() and their iterator
+  versions.
+  
+* **fix_except** - adjust "except" statements to Python 3 syntax.
+
+* **fix_exec** - convert "exec" statements to exec() function calls.
+
+* **fix_has_key** - "d.has_key(x)" -> "x in d".
+
+* **fix_input** - "input()" -> "eval(input())".
+
+* **fix_intern** - "intern(x)" -> "sys.intern(x)".
+
+* **fix_long** - remove all usage of explicit longs in favor of ints.
+
+* **fix_ne** - convert the "<>" operator to "!=".
+
+* **fix_print** - convert "print" statements to print() function calls.
+
+* **fix_raise** - convert "raise" statements to Python 3 syntax.
+
+* **fix_raw_input** - "raw_input()" -> "input()".
+
+* **fix_repr** - swap backticks for repr() calls.
+
+* **fix_sysexcinfo** - warn on usage of sys.value, sys.type and
+  sys.traceback.
+
+* **fix_throw** - fix generator.throw() calls to be 3.0-compliant.
+
+* **fix_tuple_params** - remove tuple parameters from function and method
+  declarations.
+  
+* **fix_xrange** - "xrange()" -> "range()".
+
+
 Limitations
 ===========
 


More information about the Python-checkins mailing list