Rick Copeland
unread,Apr 30, 2009, 11:16:15 AM4/30/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to metapython
MetaPython 0.2.1 has been released with hygenic macros. This works by
adding some syntax to defcode: blocks. Now defcode looks a lot more
like a function definition:
defcode result(): ...
By default, all names in the block are sanitized. If you want to NOT
sanitize something, just list it as an argument to the block. For
instance, this:
defcode result(a, ?b):
$a = 5
b = 6
c = 8
expands to this (or something very similar), assuming the name 'a'
resolves to 'foo':
foo = 5
b = 6
_mpy_0 = 8
Enjoy!