This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: help(math.fabs)
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.9
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: docs@python Nosy List: David Lambert, docs@python, rhettinger
Priority: normal Keywords:

Created on 2021-06-27 14:28 by David Lambert, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg396582 - (view) Author: David Lambert (David Lambert) Date: 2021-06-27 14:28
math.fabs returns float.
The documentation should say so, and help(math.fabs) should include the expected return type  -> float

fabs(x, /) -> float
    Return the absolute value of the float x.

I did not check, but expect these annotations recommendations are pervasive throughout the python libraries.
msg396586 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2021-06-27 16:42
Thanks for the suggestion but we've not adopted type annotations in the documentation.
msg396609 - (view) Author: David Lambert (David Lambert) Date: 2021-06-27 23:13
Hi Ray,

I'm glad this was a conscious choice.  I found a person confused by the 
output of print(abs(3), math.fabs(3))

Perhaps the manual would mention return values->that's not an annotation.

Thanks for considering,

Dave

On 6/27/21 12:42 PM, Raymond Hettinger wrote:
> Raymond Hettinger <raymond.hettinger@gmail.com> added the comment:
>
> Thanks for the suggestion but we've not adopted type annotations in the documentation.
>
> ----------
> nosy: +rhettinger
> resolution:  -> rejected
> stage:  -> resolved
> status: open -> closed
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue44519>
> _______________________________________
History
Date User Action Args
2022-04-11 14:59:47adminsetgithub: 88685
2021-06-27 23:13:14David Lambertsetmessages: + msg396609
2021-06-27 16:42:22rhettingersetstatus: open -> closed

nosy: + rhettinger
messages: + msg396586

resolution: rejected
stage: resolved
2021-06-27 14:28:32David Lambertcreate