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 serhiy.storchaka
Recipients eric.smith, serhiy.storchaka
Date 2017-05-31.20:24:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496262292.77.0.0898281487446.issue30529@psf.upfronthosting.co.za>
In-reply-to
Content
Python parser supports only ' ', '\t', '\x0c' and '\r' as whitespaces. The parser of f-strings raises incorrect error messages for subexpressions consistent only from whitespaces, if they contain whitespaces out this set.

>>> eval("\xa0")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 1
     
    ^
SyntaxError: invalid character in identifier
>>> eval("f'''{\xa0}'''")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 1
SyntaxError: f-string: empty expression not allowed
History
Date User Action Args
2017-05-31 20:24:52serhiy.storchakasetrecipients: + serhiy.storchaka, eric.smith
2017-05-31 20:24:52serhiy.storchakasetmessageid: <1496262292.77.0.0898281487446.issue30529@psf.upfronthosting.co.za>
2017-05-31 20:24:52serhiy.storchakalinkissue30529 messages
2017-05-31 20:24:52serhiy.storchakacreate