New submission from Arfrever Frehtes Taifersar Arahesis:

"""
For example, this code:

 f'abc{expr1:spec1}{expr2!r:spec2}def{expr3:!s}ghi'

Might be be evaluated as:

 'abc' + format(expr1, spec1) + format(repr(expr2)) + 'def' + 
format(str(expr3)) + 'ghi'
"""

format(repr(expr2)) should be format(repr(expr2), spec2)



"""
>>> f'x={x'
  File "<stdin>", line 1
SyntaxError: missing '}' in format string expression
"""

Actually implemented exception message is:
SyntaxError: f-string: expecting '}'



"""
>>> f'x={!x}'
  File "<fstring>", line 1
    !x
    ^
SyntaxError: invalid syntax
"""

Actually implemented exception message is:
SyntaxError: f-string: invalid conversion character: expected 's', 'r', or 'a'

----------
assignee: eric.smith
messages: 251250
nosy: Arfrever, eric.smith
priority: normal
severity: normal
status: open
title: PEP 498: Minor mistakes/outdateness

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25206>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to