New submission from Andre Roberge <[email protected]>:
Consider the following program
# example.py
one = 1
two = "two"
a = [one
.
two]
Running this program with Python versions before 3.10, yields the following
traceback:
Traceback (most recent call last):
File "C:\Users\andre\example.py", line 3, in <module>
a = [one
AttributeError: 'int' object has no attribute 'two'
The line shown correctly includes the 'int' object. I have verified that this
is the case for Python 3.6 to 3.9 inclusively.
However, with Python version 3.10.0b3, the following traceback is generated:
Traceback (most recent call last):
File "C:\Users\andre\example.py", line 5, in <module>
two]
AttributeError: 'int' object has no attribute 'two'
----------
messages: 397067
nosy: aroberge
priority: normal
severity: normal
status: open
title: AttributeError: incorrect line identified in Python 3.10
versions: Python 3.10
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue44576>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com