[Python-Dev] math.hypot, complex.__abs__, and documentation

Nick Coghlan ncoghlan at gmail.com
Tue Feb 16 23:12:58 CET 2010


David DiCato wrote:
> … then we see that ‘inf’ is printed in both cases. The standard library
> tests (for example, test_cmath.py:test_abs()) seem to test for this
> behavior as well, and FWIW, I personally agree with this convention.
> However, the math module’s documentation for both 2.6 and 3.1 states,
> “All functions return a quiet NaN if at least one of the args is NaN.”
> 
> math.pow(1.0, nan) is another such exception to the rule. Perhaps the
> documentation should be updated to reflect this.

This sounds like a legitimate documentation bug for the tracker at
bugs.python.org (bug reports tend to get lost/forgotten if they only
exist on the mailing list).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list