Rick Copeland
unread,Mar 31, 2009, 5:59:55 PM3/31/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
I was considering whether it would be preferable/possible to remove
the Jinja2 dependency in MetaPython. You could use macros and import-
time expressions "$(...)" to do nearly everything Jinja2 does inside a
defcode:... block. One outstanding issue, I suppose, is how to to
token pasting would work. Right now, the following creates a class
with a custom name:
defcode result:
class $name$Class:
pass
Maybe we could use $ as a token-paster (kind of like the C
preprocessor uses ##).
Also, if Jinja2 goes away, it might be nice to have some special
syntax for import-time control structures (if, while, and for) so
that, for instance,
?for x in [ 1, 2, 3 ]:
print x
Would yield :
print 1
print 2
print 3
Any thoughts?