[Python-checkins] r54783 - sandbox/trunk/2to3/fixes/fix_except.py sandbox/trunk/2to3/fixes/fix_tuple_params.py
collin.winter
python-checkins at python.org
Thu Apr 12 08:05:37 CEST 2007
Author: collin.winter
Date: Thu Apr 12 08:05:37 2007
New Revision: 54783
Modified:
sandbox/trunk/2to3/fixes/fix_except.py
sandbox/trunk/2to3/fixes/fix_tuple_params.py
Log:
Add a bunch of TODO points.
Modified: sandbox/trunk/2to3/fixes/fix_except.py
==============================================================================
--- sandbox/trunk/2to3/fixes/fix_except.py (original)
+++ sandbox/trunk/2to3/fixes/fix_except.py Thu Apr 12 08:05:37 2007
@@ -64,6 +64,7 @@
# Insert "old_N = new_N" as the first statement in
# the except body. This loop skips leading whitespace
# and indents
+ #TODO(cwinter) suite-cleanup
suite_stmts = e_suite.children
for i, stmt in enumerate(suite_stmts):
if isinstance(stmt, pytree.Node):
@@ -76,10 +77,11 @@
else:
assign = Assign(target, new_N)
- #XXX(cwinter) stopgap until children becomes a smart list
+ #TODO(cwinter) stopgap until children becomes a smart list
for child in reversed(suite_stmts[:i]):
e_suite.insert_child(0, child)
e_suite.insert_child(i, assign)
+ #TODO(cwinter) fix this when children becomes a smart list
children = [c.clone() for c in node.children[:3]] + try_cleanup
return pytree.Node(node.type, children)
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:05:37 2007
@@ -43,6 +43,7 @@
suite = results["suite"]
args = results["args"]
# This crap is so "def foo(...): x = 5; y = 7" is handled correctly.
+ # TODO(cwinter): suite-cleanup
if suite[0].children[1].type == token.INDENT:
start = 2
indent = suite[0].children[1].value
@@ -78,9 +79,11 @@
return node
# This isn't strictly necessary, but it plays nicely with other fixers.
+ # TODO(cwinter) get rid of this when children becomes a smart list
for line in new_lines:
line.parent = suite[0]
+ # TODO(cwinter) suite-cleanup
after = start
if start == 0:
new_lines[0].set_prefix(" ")
More information about the Python-checkins
mailing list