]> granicus.if.org Git - python/commit
Patch #1675423: PyComplex_AsCComplex() now tries to convert an object
authorGeorg Brandl <georg@python.org>
Sat, 17 Mar 2007 16:08:45 +0000 (16:08 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 17 Mar 2007 16:08:45 +0000 (16:08 +0000)
commit2b869943fa284be9f3b9572df10b334f12962aa6
tree4b14375b0251356b2399d78107c2cb3d4f7fc111
parent6f187743ffbce522c9d686ae5393272c1eb85dcc
Patch #1675423: PyComplex_AsCComplex() now tries to convert an object
to complex using its __complex__() method before falling back to the
__float__() method. Therefore, the functions in the cmath module now
can operate on objects that define a __complex__() method.
 (backport)
Doc/api/concrete.tex
Doc/lib/libcmath.tex
Lib/test/test_cmath.py
Misc/NEWS
Objects/complexobject.c