>>> package = "foo"
>>> whatever = "bar"
>>> "Enjoy {package}".format(**locals())
'Enjoy foo'
(disclaimer: I wouldn't actually use locals() like this in real code)Also, if this thing is truly mangling bytecode, it's not portable between different python versions
But i'm not quite sure about that: I only skimmed the codebase, and that works seems to be done by interpy_untokenize, which boils down to some string mangling
Also, having expressions (or worse, statements... like it would be in ruby since there's no difference there) evaluated when evaluating a string is quite bad (this is not Haskell, and thus we cannot have guarantees that side effects won't happen)
Nice hack, btw