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: locale.str docstring is incorrect: "Convert float to integer"
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, mark.dickinson, orsenthil, supriyanto maftuh
Priority: normal Keywords: easy, patch

Created on 2016-04-06 07:29 by mark.dickinson, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue26699.patch luiz.poleto, 2016-04-12 04:29 review
Messages (2)
msg262936 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2016-04-06 07:29
[Observed by one of my colleagues]

The locale.str docstring currently looks like this (and apparently has been
this way since the dawn of time):

    def str(val):
        """Convert float to integer, taking the locale into account."""

The output of str doesn't *look* like an integer on my machine. :-)

    Python 2.7.10 |Master 2.1.0.dev1829 (64-bit)| (default, Oct 21 2015, 09:09:19) 
    [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.6)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import locale
    >>> locale.setlocale(locale.LC_NUMERIC, 'fr_FR')
    'fr_FR'
    >>> locale.str(34.56)
    '34,56'
msg263311 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2016-04-13 06:17
Thanks. Fixed in

https://hg.python.org/cpython/rev/2b35ef6a9853
https://hg.python.org/cpython/rev/ad5b079565ad
https://hg.python.org/cpython/rev/125d27d9cf9b
History
Date User Action Args
2022-04-11 14:58:29adminsetgithub: 70886
2016-04-13 06:17:23orsenthilsetstatus: open -> closed

nosy: + orsenthil
messages: + msg263311

resolution: fixed
stage: needs patch -> resolved
2016-04-12 14:52:56supriyantomaftuhsetnosy: + supriyanto maftuh
2016-04-12 04:29:03luiz.poletosetfiles: + issue26699.patch
keywords: + patch
2016-04-06 07:29:49mark.dickinsoncreate