diff options
author | Guido van Rossum <guido@python.org> | 2001-08-28 16:37:51 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-08-28 16:37:51 +0000 |
commit | cbfc855f57ab6ad7920857bba3a8e2475ef0fb33 (patch) | |
tree | 033be7a0a2b8e08608af914926c56061878fdbf2 /Python | |
parent | 63db7b9ca13cf319aeef9bab4aa107502d3f5907 (diff) | |
download | cpython-git-cbfc855f57ab6ad7920857bba3a8e2475ef0fb33.tar.gz |
The "O!" format code should implement an isinstance() test
rather than a type equality test.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/getargs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 9f76ac0b2f..a4dc57a8c3 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -875,7 +875,7 @@ convertsimple(PyObject *arg, char **p_format, va_list *p_va, char *msgbuf) 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); |