mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-13 09:46:10 +00:00
Changed "Invoked with" output to use repr() instead of str() (#518)
This gives more informative output, often including the type (or at least some hint about the type).
This commit is contained in:
committed by
Wenzel Jakob
parent
c4d8196607
commit
7146d6299c
@@ -509,7 +509,7 @@ protected:
|
||||
msg += "\nInvoked with: ";
|
||||
auto args_ = reinterpret_borrow<tuple>(args);
|
||||
for (size_t ti = overloads->is_constructor ? 1 : 0; ti < args_.size(); ++ti) {
|
||||
msg += static_cast<std::string>(pybind11::str(args_[ti]));
|
||||
msg += pybind11::repr(args_[ti]);
|
||||
if ((ti + 1) != args_.size() )
|
||||
msg += ", ";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user