Feb. 7, 2014
1:32 a.m.
Haoyi Li <haoyi.sg@...> writes:
It already works!
from macropy.string_interp import macros, s A = 10 B = 5 print s["{A} + {B} = {A + B}"] # 10 + 5 = 15
I checked out macropy and seems to be really funny. It is kind a bringing LISP (which all its power to modify the language by itself) to Python. But nevertheless, this solution is not pythonic (as least as long as the python community did not decide to include macropy and use it as inherent as macros are used in LISP) Furthermore I do NOT want {A+B} to work, since this would be PHP. I would like to use the pythonic .format() Robert