]> granicus.if.org Git - python/commit
* Fix error in definition of Im() which returned self instead of 0
authorRaymond Hettinger <python@rcn.com>
Sat, 9 Apr 2005 14:55:07 +0000 (14:55 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 9 Apr 2005 14:55:07 +0000 (14:55 +0000)
commitbdaad8c93978b22fca49cb4eeea8cdea3610bafd
treee19d9b88529db76b747591e09d7979e69af89875
parentab9ec1654fa20f2217758e43da8201f4520d8914
* Fix error in definition of Im() which returned self instead of 0
  for non-complex arguments.

* Replace type() comparisons with isinstance() checks.

* Replace apply() calls with equivalent syntactic form.

* Simplify __hash__ definition to hash the underlying tuple.

* Use math.hypot() for more robust computation of __abs__().

* Use sorted() instead of the multi-step keys/sort/iter.

* Update comment on the cmath module.
Demo/classes/Complex.py