add missing std::string to str convertion helper
factor out redundancy in std::string -> Python object helper code