Message395740
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). |
|
Date |
User |
Action |
Args |
2021-06-13 11:25:16 | fweimer | set | recipients:
+ fweimer, lys.nikolaou, pablogsal |
2021-06-13 11:25:16 | fweimer | set | messageid: <1623583516.06.0.84402770903.issue44409@roundup.psfhosted.org> |
2021-06-13 11:25:16 | fweimer | link | issue44409 messages |
2021-06-13 11:25:15 | fweimer | create | |
|