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.