forked from ceridwen/macropy
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
On some occasions it would be useful to abbreviate macro names.
Particularly ast_literal is a rather long name, and if a short quasiquoted expression includes several of them, this can make the structure of the expression difficult to see.
Example from the cond macro in unpythonic (example, implementation):
return hq[ast_literal[then] if ast_literal[test] else ast_literal[_cond(more)]]This would read better as:
a = abbrev[ast_literal]
return hq[a[then] if a[test] else a[_cond(more)]]if there was an abbrev macro.
[edit: fix link]
[edit2: fix doc link]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels