[issue28597] f-string behavior is conflicting with its documentation

2016-11-03 Thread Eric V. Smith

Eric V. Smith added the comment:

This is a duplicate of issue 28590.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> fstring's '{' from escape sequences does not start an expression

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28597] f-string behavior is conflicting with its documentation

2016-11-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> docs@python
components: +Documentation -Interpreter Core
nosy: +docs@python, eric.smith
type:  -> behavior
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28597] f-string behavior is conflicting with its documentation

2016-11-03 Thread Fabio Zadrozny

New submission from Fabio Zadrozny:

The file:

/Doc/reference/lexical_analysis.rst says that things as:

f"abc {a[\"x\"]} def"  # workaround: escape the inner quotes
f"newline: {ord('\\n')}"  # workaround: double escaping
fr"newline: {ord('\n')}"  # workaround: raw outer string

are accepted in f-strings, yet, all those examples raise a:

SyntaxError: f-string expression part cannot include a backslash

The current Python version where this was tested is: 3.6.0b4

So, either those cases should be supported or lexical_analysis.rst should be 
updated to say that '\' is not valid in the expression part of f-strings.

--
components: Interpreter Core
messages: 279992
nosy: fabioz
priority: normal
severity: normal
status: open
title: f-string behavior is conflicting with its documentation
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com