Mercurial > cpython-lru_cache-weakref
diff Objects/complexobject.c @ 19974:8edc44bd0ac7 legacy-trunk
complex_coerce(): add explicit PyComplex_Check() test. Previously,
complex_coerce() would never be called with a complex argument,
because PyNumber_Coerce[Ex] doesn't bother calling the type's coercion
method if the values already have the same type. But now, of course,
it's possible to pass an instance of a complex *subtype*, and those
must be accepted.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 19 Sep 2001 01:13:10 +0000 |
| parents | 733314fcfdaa |
| children | 3faabf54b8b8 |
line wrap: on
line diff
