This isn't a "professional" or probably even "valid" use case for Python but one area this behavior is heavily used is code golf. For those not familiar with code golf is a type of puzzle where the objective is to complete a set of requirements in the least number of source code characters as possible. Out of mainstream languages Python is surprisingly good code golf.

This is just for fun puzzle solving and not a reason to keep or change syntax in any particular way, in fact succeeding at code golf may even be loosely correlated to bad syntax rules as puzzles tend to be completed in one of the least readable ways a language can be written in. But at least be aware if this becomes forbidden syntax that's likely the most affected area of Python usage.

But it also made me think it could affect code minifiers, which is apparently a real use case in Python: (Seems this minifier doesn't actually remove the spaces between numbers and keywords where is could but fascinating niche of Python I did not know about)


On Wed, Apr 14, 2021 at 7:56 AM Victor Stinner <> wrote:
Also, would it be possible to enhance to tokenizer to report a
SyntaxWarning, rather than a SyntaxError?

Python-Dev mailing list --
To unsubscribe send an email to
Message archived at
Code of Conduct: