[issue28034] local var in "for v in iter" modify the uplevel var value.

2016-09-08 Thread R. David Murray
R. David Murray added the comment: No, that's the way python works. A for loop does not have its own scope. -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue28034] local var in "for v in iter" modify the uplevel var value.

2016-09-08 Thread jf
New submission from jf: eg: s = 'aaa' print(s) for s in '111', '222', '333': print(s) print(s) the right result should be: 'aaa' '111' '222' '333' 'aaa' but, i got: 'aaa' '111' '222' '333' '333' the local var in "for v in iter", modify the uplevel var value. Is it wrong? --