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.

Title: Built-in float docstrings are not PEP-8 compatible
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.3, Python 3.4, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: docs@python, ezio.melotti, marco.buttu, python-dev, rhettinger, tshepang
Priority: normal Keywords: patch

Created on 2013-09-22 07:18 by marco.buttu, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
floatobject.patch marco.buttu, 2013-09-22 07:18 review
Messages (4)
msg198246 - (view) Author: Marco Buttu (marco.buttu) * Date: 2013-09-22 07:18
As reported in the title: 

>>> float.as_integer_ratio.__doc__.splitlines()[2]
'Returns a pair of integers, whose ratio is exactly equal to the original'
>>> float.as_integer_ratio.__doc__.splitlines()[4]
'Raises OverflowError on infinities and a ValueError on NaNs.'
>>> float.conjugate.__doc__
'Returns self, the complex conjugate of any float.'
>>> float.is_integer.__doc__
'Returns True if the float is an integer.'
>>> float.__setformat__.__doc__.splitlines()[-2]
'Overrides the automatic determination of C-level floating point type.'

They should have been 'Return...', 'Raise...' and 'Override...'
Patch is attached
msg198504 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2013-09-28 04:35
Please don't flood the tracker with these individual reports.  Present a single consolidated patch in Issue 19069.
msg199008 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-05 21:47
New changeset ca8e75190402 by Ezio Melotti in branch '2.7':
#19069: use imperative mood in float object docstrings.  Patch by Marco Buttu.

New changeset 563074ace473 by Ezio Melotti in branch '3.3':
#19069: use imperative mood in float object docstrings.  Patch by Marco Buttu.

New changeset 63a10c942b50 by Ezio Melotti in branch 'default':
#19069: merge with 3.3.
msg199009 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-10-05 21:48
Fixed, thanks for the patch!
Date User Action Args
2022-04-11 14:57:51adminsetgithub: 63269
2013-10-05 21:48:40ezio.melottisetassignee: docs@python -> ezio.melotti
versions: + Python 2.7, Python 3.4, - Python 3.2
nosy: + ezio.melotti

messages: + msg199009
resolution: duplicate -> fixed
stage: resolved
2013-10-05 21:47:26python-devsetnosy: + python-dev
messages: + msg199008
2013-09-28 20:37:55terry.reedysetversions: - Python 3.1
2013-09-28 04:35:29rhettingersetstatus: open -> closed

nosy: + rhettinger
messages: + msg198504

resolution: duplicate
2013-09-28 03:46:41tshepangsetnosy: + tshepang
2013-09-22 07:18:10marco.buttucreate