commit | cbfc855f57ab6ad7920857bba3a8e2475ef0fb33 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Aug 28 16:37:51 2001 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Aug 28 16:37:51 2001 +0000 |
tree | 033be7a0a2b8e08608af914926c56061878fdbf2 | |
parent | 63db7b9ca13cf319aeef9bab4aa107502d3f5907 [diff] |
The "O!" format code should implement an isinstance() test rather than a type equality test.
diff --git a/Python/getargs.c b/Python/getargs.c index 9f76ac0..a4dc57a 100644 --- a/Python/getargs.c +++ b/Python/getargs.c
@@ -875,7 +875,7 @@ type = va_arg(*p_va, PyTypeObject*); p = va_arg(*p_va, PyObject **); format++; - if (arg->ob_type == type) + if (PyType_IsSubtype(arg->ob_type, type)) *p = arg; else return converterr(type->tp_name, arg, msgbuf);