2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-26 06:42:27 +00:00

richcmp3.cpp significantly simplified.

[SVN r10660]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2001-07-18 15:24:41 +00:00
parent 5031479fa2
commit c7e12ecf3d
5 changed files with 118 additions and 187 deletions

View File

@@ -106,7 +106,7 @@ namespace {
{
if(args.size() != 1 || keywords.size() != 0) {
PyErr_SetString(PyExc_TypeError, "wrong number of arguments");
throw boost::python::argument_error();
throw boost::python::error_already_set();
}
const world& w = from_python(args[0].get(), type<const world&>());
ref mydict = getattr(args[0], "__dict__");
@@ -122,7 +122,7 @@ namespace {
{
if(args.size() != 2 || keywords.size() != 0) {
PyErr_SetString(PyExc_TypeError, "wrong number of arguments");
throw boost::python::argument_error();
throw boost::python::error_already_set();
}
world& w = from_python(args[0].get(), type<world&>());
ref mydict = getattr(args[0], "__dict__");