Почему бы просто не использовать справочную таблицу?
known_types = { 'int': int, 'float': float, 'str': str # etc } var_type = known_types['int']