We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4363c95 commit 5406318Copy full SHA for 5406318
src/encoding_decoding.cpp
@@ -73,17 +73,8 @@ toml::array py_list_to_toml_array(const py::list &list) {
73
toml::time time_value = it.cast<toml::time>();
74
arr.push_back(time_value);
75
} else {
76
- std::stringstream ss;
77
-#ifdef PYPY_VERSION
78
- // see
79
- // https://github.com/conda-forge/pytomlpp-feedstock/pull/1#issuecomment-972738986
80
- // and
81
- // https://github.com/pybind/pybind11/issues/3408#issuecomment-972752210
82
- ss << "not a valid type for conversion " << std::endl;
83
-#else
84
- ss << "not a valid type for conversion " << it << std::endl;
85
-#endif
86
- throw py::type_error(ss.str());
+ throw py::type_error(
+ py::str("not a valid type for conversion {}").format(it));
87
}
88
89
return arr;
0 commit comments