main
main copied to clipboard
IronPython treats lists in for loop the same as tuples
Given the code:
x = {2:3}
for [[i], [j]] in x.items(): print(i, j)
IronPython parses and runs this code as if it was identical to:
x = {2:3}
for ((i), (j)) in x.items(): print(i, j)
CPython treats these two differently reporting the following error:
x = {2:3}
for [[i], [j]] in x.items(): print(i, j)
...
Traceback (most recent call last):
File "
TypeError: 'int' object is not iterable
^Z
Work Item Details
Original CodePlex Issue: Issue 30652 Status: Active Reason Closed: Unassigned Assigned to: Unassigned Reported on: May 9, 2011 at 7:03 PM Reported by: dinov Updated on: Feb 22, 2013 at 2:09 AM Updated by: jdhardy