Chris Morton <[email protected]> added the comment:
Hi Terry, The reason why your code does not reproduce the issue is because you
first execute the code in a global context which then puts the definition of c
in that context. Subsequent calling in the local context then works. If you
remove the first exec call (no need for the Class lines either), you will now
see the issue in 3.8.
This issue is reproducible for other containers such as lists and sets, instead
of dictionary, in this case. Replacing range(len(c)) with range(4) also shows
the same error. The error relates to the use of the indexing operator []. The
same error is observed with other sequences such as:
c={1,2,3,4}
or
c='1234'
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43481>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com