This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <1606638528.9.0.875441937767.issue42469@roundup.psfhosted.org>
In-reply-to
Content
"{" 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.
History
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: <1606638528.9.0.875441937767.issue42469@roundup.psfhosted.org>
2020-11-29 08:28:48serhiy.storchakalinkissue42469 messages
2020-11-29 08:28:48serhiy.storchakacreate