Stuart Berg added the comment:
Already closed, but FWIW, I think this was incorrectly marked as a duplicate.
Issue 20742 discusses a different issue related to lib2to3 and zip.
Meanwhile, this issue has been raised again in 28837, so I will continue the
discussion there. (I have a patch.)
Berker Peksag added the comment:
This is a duplicate of issue 20742.
--
nosy: +berker.peksag
resolution: - duplicate
stage: - resolved
status: open - closed
superseder: - 2to3 zip fixer doesn't fix for loops.
___
Python tracker
New submission from RobertG:
Consider this program
def foo(a,b):
return min(zip(a,b)[2])
print foo(range(5), (0,9,-9))
With the default options, 2to3 rewrites this as
def foo(a,b):
return min(zip(a,b)[2])
print(foo(list(range(5)), (0,9,-9)))
For some reason, 2to3 fails to
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21628
___
___