Nasty typo in PEP 238 (revised)
tim.hochberg at ieee.org
Sat Jul 28 10:17:58 EDT 2001
"Tim Peters" <tim.one at home.com> wrote:
[CRUMPLE, SPINDLE, BEND, SNIP]
> Your examples had users explicitly passing complex
> inputs to functions. I was talking about getting complex results out of
> functions when complex numbers are *not* passed to them (such as acos(2)).
> Division can never return a complex result unless given a complex input.
> see nothing surprising to anyone about complex-in, complex-out. It's only
> non-complex-in, complex-out that Python currently shields users from (in
> absence of explicitly using cmath functions). As I said, I think that's a
> benefit for the majority of users; I don't know whether Guido agrees.
What is minorly irksome is that there is no core set of math functions that
will give you complex when necessary, but return floats when they can. Cmath
insists on always spitting out complex numbers regardless of the input. It's
only minorly irksome 'cause I just use NumPys math functions and they "do
the right thing"(TM).
More information about the Python-list