Skip to content

Commit e9c7890

Browse files
committed
Remove "possible bug" TODO; investigated, no bug. Add comment.
1 parent a02bf96 commit e9c7890

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

unpythonic/syntax/letdo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@ def find_deletes(tree, collect, **kw):
301301
names = []
302302
lines = []
303303
for j, expr in enumerate(tree.elts, start=1):
304-
# TODO: do we need the recursion here? Won't this trigger false positives for nested do[] expressions?
304+
# Despite the recursion, this will not trigger false positives for nested do[] expressions,
305+
# because do[] is a second-pass macro, so they expand from inside out.
305306
expr, newnames = find_localdefs.recurse_collect(expr)
306307
expr, deletednames = find_deletes.recurse_collect(expr)
307308
assert not (newnames and deletednames), "a do-item may have only local[] or delete[], not both"

0 commit comments

Comments
 (0)