projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63db7b9
)
The "O!" format code should implement an isinstance() test
author
Guido van Rossum
<guido@python.org>
Tue, 28 Aug 2001 16:37:51 +0000
(16:37 +0000)
committer
Guido van Rossum
<guido@python.org>
Tue, 28 Aug 2001 16:37:51 +0000
(16:37 +0000)
rather than a type equality test.
Python/getargs.c
patch
|
blob
|
history
diff --git
a/Python/getargs.c
b/Python/getargs.c
index 9f76ac0b2ff9e074c2d7a173d1357ea8d85b5e5a..a4dc57a8c326c25d5ca6be726edd3299bcd97e24 100644
(file)
--- 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);