[issue37068] Emit SyntaxWarning for f-strings without expressions ?

2019-06-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Adding my agreement that this is a feature, not a bug. -- nosy: +rhettinger ___ Python tracker ___

[issue37068] Emit SyntaxWarning for f-strings without expressions ?

2019-05-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: An f-string is equivalent to a format string and call. The exact details are not important. An field with no value is an error either way. (I prefer the compile-time exception.) >>> f'{}a' SyntaxError: f-string: empty expression not allowed >>>

[issue37068] Emit SyntaxWarning for f-strings without expressions ?

2019-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not think that all uses of f-strings without expression are errors. Therefore it would be better to left this on linters. Linters are optional and usually are flexible in configuring what warnings and in what part of the code should be emitted.

[issue37068] Emit SyntaxWarning for f-strings without expressions ?

2019-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: I think this would be better suited for a linter. -- nosy: +eric.smith ___ Python tracker ___ ___

[issue37068] Emit SyntaxWarning for f-strings without expressions ?

2019-05-27 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : Or more precisely I suggest to emit a SyntaxWarning for JoinedStr where no f-string members has an expression. There seem to be a couple of case where f-strings without expressions may indicate that the programmer may have made a mistake; though