[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-05-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 89a310264000a613b7f6abd5916946aef09ae7d2 by Serhiy Storchaka in branch '3.6': [3.6] bpo-29104: Fixed parsing backslashes in f-strings. (GH-490) (#1812) https://github.com/python/cpython/commit/89a310264000a613b7f6abd5916946aef09ae7d2

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-05-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1898 ___ Python tracker ___ ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0cd7a3f196cf34d9bb0a52e61327f7fe289d9750 by Serhiy Storchaka in branch 'master': bpo-29104: Fixed parsing backslashes in f-strings. (#490) https://github.com/python/cpython/commit/0cd7a3f196cf34d9bb0a52e61327f7fe289d9750 --

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-05-17 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> patch review ___ Python tracker ___ ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-05-13 Thread Eric V. Smith
Eric V. Smith added the comment: This is on my list of things to review at PyCon, when I should finally have some free time. -- ___ Python tracker ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-05-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Eric? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping again. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ryan. I already created a PR, but I think your recipe can be helpful for me in future. -- ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-15 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: A PR has been submitted, Ryan. See https://github.com/python/cpython/pull/490 -- ___ Python tracker ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-15 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: Serhiy: if you want, you can give me your email and I'll submit a PR for you. If you want to do it yourself, just: Download hub: https://hub.github.com/ git clone python/cpython cpython-git cd cpython-git git fork curl

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-15 Thread Eric V. Smith
Eric V. Smith added the comment: Serhiy: I plan to find time in the next week or so to look at this. Sorry for the delay. Plus, the new workflow isn't helping me out: I need to get up to speed on it. -- ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +403 ___ Python tracker ___ ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not experienced with git and am waiting until new workflow be described in the devguide. -- ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-02-24 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Serhiy, since review activity has dropped on b.p.o now that the move to github was made, would you like to make this into a pull request to get it reviewed and merged faster? -- ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch adds a warning. -- Added file: http://bugs.python.org/file46127/fstring_backslash_2.patch ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-01-03 Thread STINNER Victor
STINNER Victor added the comment: > There is no issue with f'\\{10}'. There is an issue with f'\{10}'. Hum, I'm not sure that my previous comment is explicit: I suggest to raise a syntax error on f'\{10}' (or emit a warning, and raise an error in 3.7 if you insist ;-)). --

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > f'\\N{AMPERSAND}': reading a local variable looks like a typo or a security > vulnerability, rather than a nice feature. This can look as a typo, but how would you write this if this is not a typo? f'\\N{AMPERSAND}' is legitimate syntax, and it would be

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-01-03 Thread STINNER Victor
STINNER Victor added the comment: The PEP 498 should be updated to define the expected behaviour of f'\{5}': https://www.python.org/dev/peps/pep-0498/#escape-sequences +self.assertEqual(f'\{6*7}', '\\42') +self.assertEqual(f'\\{6*7}', '\\42') +

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch fixes parsing backslashes in f-strings. P.S. Definitely we should find other name for this term. I hate misleading "f-string". -- keywords: +patch Added file: http://bugs.python.org/file46080/fstring_backslash.patch

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: This problem was no doubt introduced after 3.6a1 when I changed the parsing to disallow backslashes inside {}. -- ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: Yes: >>> f'\{2*5}' '\\{10' I agree '\\10' would make sense. -- ___ Python tracker ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem is not that the trailing } is dropped, but that the starting { starts an f-string expression. >>> f'\{2*5}' '\\{10' I expected either '\\10' as in '\{}'.format(2*5), or at least '\\{2*5}'. There is other f-string parsing error: >>> f'\\N{2*5}'

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Yes, should've attached in my previous message. See http://stackoverflow.com/questions/41330097/why-does-the-symbol-remain-when-f-10-is-evaluated-in-python-3-6 -- ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: Do you have a link to the SO question? -- ___ Python tracker ___ ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: I see, the original "complaint" about this behavior on stack overflow was made due to the discrepancy between the f-string the the format "equivalent": '\{}'.format(10)'. -- ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: But I admit that dropping the trailing } seems odd. I think this particular usage should be an error: no bare } allowed, similar to: >>> f'10}' File "", line 1 SyntaxError: f-string: single '}' is not allowed --

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure this counts as an error. The backslash means to treat the next character literally, which this does. And since \{ is not a valid escape sequence, it keeps both characters, exactly like: >>> '\c' '\\c' Furthermore, since unknown escape sequences

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread SilentGhost
Changes by SilentGhost : -- nosy: +eric.smith type: -> behavior ___ Python tracker ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: In short: >>> f"\{10}" yields: "\\{10" This is reproducible only when `\` precedes the opening bracket, that is: >>> f"\ {10}" results in: "\\ 10" -- components: Interpreter Core messages: 284249 nosy: Jim Fasarakis-Hilliard