This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lys.nikolaou
Recipients gvanrossum, lys.nikolaou, pablogsal
Date 2020-04-12.21:59:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586728764.59.0.587923723315.issue40267@roundup.psfhosted.org>
In-reply-to
Content
There are cases, where the error message differs, when an expression is being parsed inside an fstring. For example:

>>> f'{x+}'
  File "<fstring>", line 1
    (x+)
       ^
SyntaxError: unexpected EOF while parsing
>>> (x+)
  File "<stdin>", line 1
    (x+)
       ^
SyntaxError: invalid syntax

Or with lambda definitions:

>>> f'{lambda x:x}'
  File "<fstring>", line 1
    (lambda x)
             ^
SyntaxError: unexpected EOF while parsing
>>> (lambda x)
  File "<stdin>", line 1
    (lambda x)
             ^
SyntaxError: invalid syntax
History
Date User Action Args
2020-04-12 21:59:24lys.nikolaousetrecipients: + lys.nikolaou, gvanrossum, pablogsal
2020-04-12 21:59:24lys.nikolaousetmessageid: <1586728764.59.0.587923723315.issue40267@roundup.psfhosted.org>
2020-04-12 21:59:24lys.nikolaoulinkissue40267 messages
2020-04-12 21:59:24lys.nikolaoucreate