Author fweimer
Recipients fweimer, lys.nikolaou, pablogsal
Date 2021-06-13.11:25:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623583516.06.0.84402770903.issue44409@roundup.psfhosted.org>
In-reply-to
Content
This example results in an undocumented value None for the lineno attribute:

```
source = b"\xef\xbb\xbf#coding: utf8\nprint('\xe6\x88\x91')\n"

try:
    compile(source, filename="example.py", mode="exec")
except SyntaxError as e:
    print(str(e))
    print(type(e.lineno))
```

Output:

```
encoding problem: utf8 with BOM
<class 'NoneType'>
```

Seen with python3-3.9.5-2.fc33.x86_64.

python3-3.8.10-1.fc32.x86_64 used a lineno value of 0 (type int).
History
Date User Action Args
2021-06-13 11:25:16fweimersetrecipients: + fweimer, lys.nikolaou, pablogsal
2021-06-13 11:25:16fweimersetmessageid: <1623583516.06.0.84402770903.issue44409@roundup.psfhosted.org>
2021-06-13 11:25:16fweimerlinkissue44409 messages
2021-06-13 11:25:15fweimercreate