[Python-checkins] r54475 - sandbox/trunk/2to3/fixes/fix_long.py

collin.winter python-checkins at python.org
Wed Mar 21 04:14:04 CET 2007


Author: collin.winter
Date: Wed Mar 21 04:14:02 2007
New Revision: 54475

Modified:
   sandbox/trunk/2to3/fixes/fix_long.py
Log:
Take advantage of the new Number macro.

Modified: sandbox/trunk/2to3/fixes/fix_long.py
==============================================================================
--- sandbox/trunk/2to3/fixes/fix_long.py	(original)
+++ sandbox/trunk/2to3/fixes/fix_long.py	Wed Mar 21 04:14:02 2007
@@ -10,7 +10,7 @@
 import pytree
 from pgen2 import token
 from fixes import basefix
-from fixes.util import Name
+from fixes.util import Name, Number
 
 
 class FixLong(basefix.BaseFix):
@@ -31,7 +31,7 @@
             assert node == self.static_long, node
             new = self.static_int.clone()
         if number and node.value[-1] in ("l", "L"):
-            new = pytree.Leaf(token.NUMBER, node.value[:-1])
+            new = Number(node.value[:-1])
         if new is not None:
             new.set_prefix(node.get_prefix())
             return new


More information about the Python-checkins mailing list