[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-19 Thread flying sheep
Changes by flying sheep : -- nosy: +flying sheep ___ Python tracker ___ ___

[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-09 Thread Eric V. Smith
Eric V. Smith added the comment: I've fixed the code and fixed/added tests. I still need to update the docs and PEP 498. I'll create a separate issue for the docs, once I'm done with the PEP. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset b3ac1e154cdd by Eric V. Smith in branch 'default': Issue 27948: Allow backslashes in the literal string portion of f-strings, but not in the expressions. Also, require expressions to begin and end with literal curly braces.

[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-09 Thread Eric V. Smith
Eric V. Smith added the comment: Updated patch, works against HEAD. I added a few tests and tweaked some comments. My goal is to commit this today, before the 3.6b1 cutoff. I don't think there's much risk to it. I still need to update the PEP. -- Added file:

[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-07 Thread Eric V. Smith
Changes by Eric V. Smith : -- stage: needs patch -> patch review ___ Python tracker ___

[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-07 Thread Eric V. Smith
Eric V. Smith added the comment: This patch implements the new logic. It passes all of the fstring tests (except of course the ones that had backslashes in the expressions). I'd still like to add some more tests, because I'm not convinced the named unicode escapes are correct (f"\N{LEFT CURLY

[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-03 Thread Eric V. Smith
New submission from Eric V. Smith: See issue 27921. Currently (and for 3.6 beta 1), backslashes are not allowed anywhere in f-strings. This needs to be changed to allow them in the string parts, but not in the expression parts. Also, require that the start and end of an expression be literal