On Mon, 28 Sep 2020 at 13:56, Nick Coghlan <ncogh...@gmail.com> wrote:
> For usage, whether something is a macro or not should either be irrelevant 
> (when they're used as a more powerful function call or
> decorator), or else entirely obvious from the way you use it (when they're 
> defining a new pseudo-statement), so it doesn't make sense to
> emphasize the syntactic marker too much.

IMHO `import!` can be easily confused with `import`, even with a
monospace font. An alternative is that macro must have a name
different from keywords (so you will have macro_import!, for example),
even if I'd prefer my first proposal (maybe something like %import).

> Putting the marker gives the compiler the info and reader the info they need 
> without being too obtrusive (and also matches the way Rust
> macros are used). Using "!" as a prefix operator is also effectively already 
> claimed by IPython for shell command execution, so I'd be
> surprised if we ever used that spelling for anything else.

Python uses None instead of Null and try-except instead of try-catch :-)

PS: I agree with the rest of the post.
_______________________________________________
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/H5N5YE5JYSZZTR73CJLJNUTWRDPRYN2R/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to