[issue32376] Unusable syntax error reported when Python keyword in a f-string

2017-12-19 Thread R. David Murray
R. David Murray added the comment: The existing issue is #29051. -- nosy: +r.david.murray resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Improve error reporting involving f-strings (PEP 498) ___ Python

[issue32376] Unusable syntax error reported when Python keyword in a f-string

2017-12-19 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, this is a real problem. I think there's already an issue for this, but I can't find it. Unfortunately, to fix it requires a bit of refactoring on how line numbers and errors are tracked. It's on my list of things to do. -- nosy: +eric.smith stage

[issue32376] Unusable syntax error reported when Python keyword in a f-string

2017-12-19 Thread Dmitry sky
New submission from Dmitry sky : def get_search_url(from_, to): return f"http://thesite.com/Search?SO0={from_}&SD0={to}&SD1={from}&NA=false"; # pls note `from_` vs `from` ^^ $ python fstring.py File "", line 1 (from) ^ SyntaxError: invali