]> granicus.if.org Git - python/commit
complex_coerce(): add explicit PyComplex_Check() test. Previously,
authorGuido van Rossum <guido@python.org>
Wed, 19 Sep 2001 01:13:10 +0000 (01:13 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 19 Sep 2001 01:13:10 +0000 (01:13 +0000)
commit638059603ca96a1e9b6d05f4d5c51a06a17b63ec
tree5e73d5d40ab7c5befda32c1b1533d91b07a1e93d
parent50fda6c21fac39e440815acf75149e1e420cf4d7
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.
Objects/complexobject.c