mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-19 01:15:52 +00:00
string wrap
This commit is contained in:
parent
8b241f1727
commit
f205bb4840
@ -1382,7 +1382,7 @@ obj_attr_accessor object_api<D>::attr_with_type_hint(handle key) const {
|
||||
object ann = annotations();
|
||||
object reinterpreted_key = reinterpret_borrow<object>(key);
|
||||
if (ann.contains(reinterpreted_key)) {
|
||||
throw std::runtime_error("__annotations__[\"" + py_str(reinterpreted_key)
|
||||
throw std::runtime_error("__annotations__[\"" + std::string(py_str(reinterpreted_key))
|
||||
+ "\"] was set already.");
|
||||
}
|
||||
ann[key] = make_caster<T>::name.text;
|
||||
|
Loading…
Reference in New Issue
Block a user