2
0
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:
Ullrich Köthe
2000-11-24 12:44:17 +00:00
parent 0bcf6cfba1
commit 6638efe5a2
6 changed files with 19 additions and 6 deletions

View File

@@ -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;