3 ms·
You can have something like this today if you really want to :): def f(s): import sys return s.format(**sys._getframe(1).f_locals) Used as
by filmor 11y ago
You can have something like this today if you really want to :):
def f(s):
import sys
return s.format(**sys._getframe(1).f_locals)
Used as
a = 1
b = 2
f("{a} + {b}")