How can I automagically resolve format specifiers in Python? For example instead of:
MagicPrint(str.format('This is {}', my.name))
I want to write MagicPrint() function as follows:
MagicPrint('This is {my.name}')
Suggestions? Maybe I can use decorators for MagicPrint() function?
Please note that my.name is not present in **locals() because MagicPrint() can be called from another module.
formatand 2. using%notations.'This is %s'% my.name