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?
----------
components: Interpreter Core
messages: 275233
nosy: zaazbb
priority: normal
severity: normal
status: open
title: local var in "for v in iter" modify the uplevel var value.
type: behavior
versions: Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28034>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com