[issue47129] Improve errors messages in f-string syntax errors

2022-03-28 Thread Maciej Górski
Maciej Górski added the comment: Thanks for helping me with my very first python contribution! @eric.smith @lys.nikolaou -- ___ Python tracker ___

[issue47129] Improve errors messages in f-string syntax errors

2022-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, @macgors! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker ___

[issue47129] Improve errors messages in f-string syntax errors

2022-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 7b44ade018cfe6f54002a3cee43e8aa415d4d635 by Maciej Górski in branch 'main': bpo-47129: Add more informative messages to f-string syntax errors (32127) https://github.com/python/cpython/commit/7b44ade018cfe6f54002a3cee43e8aa415d4d635 --

[issue47129] Improve errors messages in f-string syntax errors

2022-03-27 Thread Maciej Górski
Maciej Górski added the comment: I agree as well. I will change it to the new version :) Thanks for your input in this. -- ___ Python tracker ___

[issue47129] Improve errors messages in f-string syntax errors

2022-03-27 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: I like the newest suggestion by @Jelle better as well. -- ___ Python tracker ___ ___

[issue47129] Improve errors messages in f-string syntax errors

2022-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: >From a suggestion by @Jelle on the python discord server: how about just >"f-string: expression required before '!'"? -- ___ Python tracker

[issue47129] Improve errors messages in f-string syntax errors

2022-03-26 Thread Maciej Górski
Maciej Górski added the comment: Understandable. In this case I can maybe propose something along the lines of "f-string: empty expression not allowed (Conversion specifier '!' can only follow non-empty expressions)", and so on for each of the specifiers. This way the original message is

[issue47129] Improve errors messages in f-string syntax errors

2022-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not convinced this is an improvement. I don't think someone trying '!' in an f-string expression happens often enough to worry about that specific error message. And a generic "optional specifier" isn't great. If we're going to do this, it should

[issue47129] Improve errors messages in f-string syntax errors

2022-03-26 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47129] Improve errors messages in f-string syntax errors

2022-03-26 Thread Maciej Górski
Change by Maciej Górski : -- keywords: +patch pull_requests: +30206 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32127 ___ Python tracker ___

[issue47129] Improve errors messages in f-string syntax errors

2022-03-26 Thread Maciej Górski
New submission from Maciej Górski : When an empty expression is provided in curly brackets inside an f-string we get Syntax Error: "f-string: empty expression not allowed". This is correct, however error with the same message is raised in the following cases: f"{!foo}", f"{!}", f"{:bar}",