Author serhiy.storchaka
Recipients ezio.melotti, mrabarnett, reuven, rhettinger, serhiy.storchaka, terry.reedy
Date 2020-11-29.08:28:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
"{" has special meaning only when it is used in the special forms "\{[0-9]+\}", "\{,[0-9]+\}" or "\{[0-9]+,[0-9]+\}". In all other cases it means literal "{". I once tried to emit warnings when non-escaped "{" is used in literal meaning, but it did break a lot of code (for example in string.Template). I decided that it is too destructive change.

Now, we can emit a warning (and later error) if there are extra spaces. It is a breaking change, but I hope it will not break much user code. But which cases should be recognized as error and which silently accepted with literal meaning of "{"? Should we only handle spaces after comma, or before and after digits? Should we check spaces only or tabs and newlines and other whitespaces?

What about the verbose mode? Currently the third-party regex module ignores whitespace and comments in the verbose mode in more places than the re module. The re module consider some sequences atomic and does not allow whitespaces inside them even in the verbose mode, for simplicity and performance.
Date User Action Args
2020-11-29 08:28:48serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, terry.reedy, ezio.melotti, mrabarnett, reuven
2020-11-29 08:28:48serhiy.storchakasetmessageid: <>
2020-11-29 08:28:48serhiy.storchakalinkissue42469 messages
2020-11-29 08:28:48serhiy.storchakacreate