How can I get calls to int (), float (), dict (), etc. from their names? For example, I am trying to save Python values ββin xml and save the variable type as a string. Is there a way to get called from string when converting from string back to Python type?
Normally I would do something like getattr (myobj, 'str'), but there is no module to use as the first argument for these built-in conversion functions. I also tried getattr (object, 'str'), but this will not work, since these functions are not part of the base type of the object, but simply globalize the language.
source share