September 15, 2020 4:31 PM, "Gregory P. Smith" <g...@krypto.org 
(mailto:g...@krypto.org?to=%22Gregory%20P.%20Smith%22%20<g...@krypto.org>)> 
wrote:
On Tue, Sep 15, 2020 at 1:27 PM <ed...@211mainstreet.net 
(mailto:ed...@211mainstreet.net)> wrote: 
September 15, 2020 4:02 PM, "Daniel Butler" <dabutle...@gmail.com 
(mailto:dabutle...@gmail.com?to=%22daniel%20butler%22%20%3cdabutle...@gmail.com%3E)>
 wrote:
> Users would be encouraged to try it but

> NOT to publish code using it.Thinking out loud, macros could be enabled with 
> a command line flag. Advanced users would know how to use it but others would 
> not. If the macro flag is not enabled it raises a syntax error. Thoughts?
--Thank you!

Daniel Butler
A command line flag would be slightly better. All the documentation warnings in 
the world will not be enough to prevent all the cargo culters from creating 
some of the hardest to read code you ever saw.

If you're talking about a command line flag, I suggest you read the pre-PEP. 
The proposal requires explicit import-like syntax to bring the macro in for 
parsing of code in the duration of the scope of that import. Which is actually 
what you'd want for this kind of thing: explicitly declaring which additional / 
alternate syntax features you use in the code using it. It is similar from the 
existing `from __future__ import behavior` system.

-gps
That may be, but I dislike the thought that 10 years from now the standard 
Stack Overflow answer to "how do I do x in Python" will be "use my magic 5000 
line macro". A command line flag requires more effort, because you need to 
continually retype it. In theory, that little bit of extra effort could help to 
limit macro use to areas where it actually is useful. 

--Edwin
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/JTVIS6JQNS5RO6XEYZCRMJ4WLWPLWUMZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to