3 ms·
There are a few cool macros in Python, e.g. decorators. It's just that you can't define your own without making it past Guido. (To be clear, decorators aren't
by thanatropism 9y ago
There are a few cool macros in Python, e.g. decorators. It's just that you can't define your own without making it past Guido.
(To be clear, decorators aren't macros, "decorator" is a macro)
- xapata 9y agoYou kinda can, through the file encoding specifier. It'll let you write reader macros that programmatically modify the AST, essentially.