[issue28827] f-strings: format spec should not accept unicode escapes

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Py

[issue28827] f-strings: format spec should not accept unicode escapes

2017-06-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Should this issue be closed as "not a bug"? -- status: open -> pending ___ Python tracker ___ ___

[issue28827] f-strings: format spec should not accept unicode escapes

2016-11-28 Thread Eric V. Smith
Eric V. Smith added the comment: Specifically, see: https://www.python.org/dev/peps/pep-0498/#format-specifiers str.format() also works this way: >>> '{0:02{1}}'.format(10, an_x) '0A' -- ___ Python tracker ___

[issue28827] f-strings: format spec should not accept unicode escapes

2016-11-28 Thread Decorater
Decorater added the comment: there is also the most common. '{10:02{0}}'.format(an_x) -- nosy: +Decorater ___ Python tracker ___ ___ P

[issue28827] f-strings: format spec should not accept unicode escapes

2016-11-28 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is documented. This is a result of supported nested expressions in the format_spec: >>> an_x = "X" >>> f'{10:02{an_x}}' '0A' -- ___ Python tracker ___

[issue28827] f-strings: format spec should not accept unicode escapes

2016-11-28 Thread Martin Panter
Martin Panter added the comment: I don’t have Py 3.6 to test on, but won’t that make it unnecessarily inconvenient to use certain format codes? I.e. codes that involve non-ASCII characters, control codes, quote signs, or backslashes. Slightly silly use case: >>> "The time is {:%I\N{DEGREE SIGN

[issue28827] f-strings: format spec should not accept unicode escapes

2016-11-28 Thread Yury Selivanov
Yury Selivanov added the comment: Also this inconsistency: we already don't accept escaped letters after `!`: >>> f'{min!\N{LATIN SMALL LETTER R}}' File "", line 1 SyntaxError: f-string: invalid conversion character: expected 's', 'r', or 'a' -- __

[issue28827] f-strings: format spec should not accept unicode escapes

2016-11-28 Thread Yury Selivanov
New submission from Yury Selivanov: Right now, Python 3.6b4 happily accepts the following: >>> f'{10:02\N{LATIN CAPITAL LETTER X}}' '0A' >>> f'{10:02X}' '0A' I think that the first line should not be accepted (as we now don't accept escaped open curly brace). At least this sho