3 ms·
That's not difficult at all. You can just say env['f'] = myfunc and the function will be available as f within the environment.
by jpfr 10y ago
That's not difficult at all.
You can just say
env['f'] = myfunc
and the function will be available as f within the environment.
- marktangotango 10y agoCan be a little verbose as this example shows[1], but works really well in practice. [1] http://stackoverflow.com/a/6982080 http://stackoverflow.com/a/6982080
- shakna 10y agoThat does look really interesting, I'll keep it in mind for the future!