mirror of
https://github.com/boostorg/python.git
synced 2026-02-09 11:22:21 +00:00
bug fix in error reporting of __init__
[SVN r8316]
This commit is contained in:
@@ -154,7 +154,7 @@ PyObject* function::call(PyObject* args, PyObject* keywords) const
|
||||
message += description_as_string(desc);
|
||||
message += ",\nbut got ";
|
||||
tuple arguments(ref(args, ref::increment_count));
|
||||
message += argument_tuple_as_string(arguments);
|
||||
message += arguments_as_string(arguments);
|
||||
message += " instead.";
|
||||
PyErr_SetObject(PyExc_TypeError, message.get());
|
||||
}
|
||||
@@ -177,7 +177,7 @@ PyObject* function::call(PyObject* args, PyObject* keywords) const
|
||||
message += " matches argument(s):\n";
|
||||
|
||||
tuple arguments(ref(args, ref::increment_count));
|
||||
message += argument_tuple_as_string(arguments);
|
||||
message += arguments_as_string(arguments);
|
||||
|
||||
message += "\nCandidates are:\n";
|
||||
for (const function* f1 = this; f1 != 0; f1 = f1->m_overloads.get())
|
||||
@@ -192,6 +192,11 @@ PyObject* function::call(PyObject* args, PyObject* keywords) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
string function::arguments_as_string(tuple arguments) const
|
||||
{
|
||||
return argument_tuple_as_string(arguments);
|
||||
}
|
||||
|
||||
bound_function* bound_function::create(const ref& target, const ref& fn)
|
||||
{
|
||||
bound_function* const result = free_list;
|
||||
|
||||
Reference in New Issue
Block a user