◐ Shell
clean mode source ↗

Message 323301 - Python tracker

Inconsistent tracebacks. Note that the traceback for bug.py does not 
reference the
module file and line number.

# bug.py
def f():
   f'''
   {d e}'''
a=b

import bug

Traceback (most recent call last):
   File "<fstring>", line 1
     (d e)
        ^
SyntaxError: invalid syntax

----------------------------------------

# bug2.py
def f():
   f'''
   {de}'''
a=b

import bug2
bug2.f()

Traceback (most recent call last):
   File "C:\python\bug2.py", line 5, in <module>
     a=b
NameError: name 'b' is not defined