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: https://github.com/dflook/python-minifier (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)
Regards Damian (he/him)
On Wed, Apr 14, 2021 at 7:56 AM Victor Stinner email@example.com wrote:
Also, would it be possible to enhance to tokenizer to report a SyntaxWarning, rather than a SyntaxError?
Victor _______________________________________________ Python-Dev mailing list -- firstname.lastname@example.org To unsubscribe send an email to email@example.com https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://firstname.lastname@example.org/message/CH7SLXKI... Code of Conduct: http://python.org/psf/codeofconduct/