[Python-checkins] r54782 - sandbox/trunk/2to3/fixes/fix_tuple_params.py

collin.winter python-checkins at python.org
Thu Apr 12 08:03:33 CEST 2007


Author: collin.winter
Date: Thu Apr 12 08:03:32 2007
New Revision: 54782
Modified:
 sandbox/trunk/2to3/fixes/fix_tuple_params.py
Log:
Cleanup to reflect that node.children is now a list.
Modified: sandbox/trunk/2to3/fixes/fix_tuple_params.py
==============================================================================
--- sandbox/trunk/2to3/fixes/fix_tuple_params.py	(original)
+++ sandbox/trunk/2to3/fixes/fix_tuple_params.py	Thu Apr 12 08:03:32 2007
@@ -88,11 +88,9 @@
 new_lines[0].set_prefix(indent)
 after = start + 1
 
- children = list(suite[0].children) 
- children[after:after] = new_lines
+ suite[0].children[after:after] = new_lines
 for i in range(after+1, after+len(new_lines)+1):
- children[i].set_prefix(indent)
- suite[0].children = tuple(children)
+ suite[0].children[i].set_prefix(indent)
 suite[0].changed()
 
 def transform_lambda(self, node):


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /