[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-09-11 Thread Julien Palard
Change by Julien Palard : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-09-11 Thread Julien Palard
Julien Palard added the comment: New changeset 629f1f87e9b0bfd9f1dc3d02f966decde5c65201 by Julien Palard (Miss Islington (bot)) in branch '3.8': bpo-23460: Fix documentation for decimal string :g formatting (GH-11850) (GH-15954)

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-09-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +15589 pull_request: https://github.com/python/cpython/pull/15954 ___ Python tracker ___

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-09-11 Thread Julien Palard
Julien Palard added the comment: New changeset 1660a61a105bcd62e2dfa77885959a8992e9f14e by Julien Palard (Brennan D Baraban) in branch 'master': bpo-23460: Fix documentation for decimal string :g formatting (GH-11850)

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-03-03 Thread Brennan D Baraban
Brennan D Baraban <3...@holbertonschool.com> added the comment: Hi Stefan. Is there an update you would like me to make on this PR? Otherwise, pinging for review. -- ___ Python tracker

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-02-24 Thread Stefan Krah
Stefan Krah added the comment: On the other hand, the docs say "insignificant trailing zeros are removed from the significand", so technically it *is* correct, because trailing zeros are significant in decimal. -- ___ Python tracker

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-02-24 Thread Stefan Krah
Stefan Krah added the comment: I just noticed that there are other differences, for example the "removal of trailing zeros" passage does not apply to Decimal: >>> format(Decimal("1.00e-6"), "g") '0.0100' Perhaps it would be easier to have separate docs for float and decimal

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-02-13 Thread Brennan D Baraban
Brennan D Baraban <3...@holbertonschool.com> added the comment: I submitted a PR just now. I only pushed the change to `string.rst`, as per Stefan Krah's suggestion. -- ___ Python tracker

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-02-13 Thread Brennan D Baraban
Change by Brennan D Baraban <3...@holbertonschool.com>: -- pull_requests: +11881 stage: needs patch -> patch review ___ Python tracker ___

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-02-11 Thread Brennan D Baraban
Brennan D Baraban <3...@holbertonschool.com> added the comment: Well, Tuomas, I defer submission of a PR to you, as its your original patch. -- ___ Python tracker ___

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-02-11 Thread Stefan Krah
Stefan Krah added the comment: Yes, these days PRs are the only way to get anything done. Before GitHub it would have been possible to just commit the small diff directly to master. -- ___ Python tracker

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-02-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > If contributions are accepted as GitHub pull requests these days, I can do it myself too. GitHub pull requests are accepted. Please see https://devguide.python.org/ . Thanks -- nosy: +xtreak ___

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-02-11 Thread Stefan Krah
Stefan Krah added the comment: The patch LGTM, but I'm not sure if we need to document __format__(). Personally I probably wouldn't. -- ___ Python tracker ___

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-02-11 Thread Tuomas Suutari
Tuomas Suutari added the comment: > What is the status of this issue? I can submit a PR based on Tuomas Suutari's > patch. Don't know more about the status, but nobody seemed to care to take my patch forward. If contributions are accepted as GitHub pull requests these days, I can do it

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-02-10 Thread Brennan D Baraban
Brennan D Baraban <3...@holbertonschool.com> added the comment: What is the status of this issue? I can submit a PR based on Tuomas Suutari's patch. -- nosy: +bdbaraban ___ Python tracker

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2018-10-24 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- nosy: +sir-sigurd ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2018-09-02 Thread Lorenz Mende
Lorenz Mende added the comment: I want to bring this issue up again. As the others correctly stated, either the documentation or the implementation of Decimal 'g' formatting is incorrect. For floats the implementation suits the docu: >>> '{:g}'.format(0.1) '1e-05' For decimals: >>>

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2015-03-07 Thread Tuomas Suutari
Tuomas Suutari added the comment: Here's a patch that fixes the description for 'g' to explain what happens for `Decimal` and also documents the Decimal.__format__ in the documentation of the decimal module. -- keywords: +patch nosy: +Tuomas Suutari Added file:

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2015-03-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy stage: - needs patch type: - enhancement versions: +Python 2.7, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23460

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2015-03-02 Thread Mark Dickinson
Mark Dickinson added the comment: I don't think we should close: the documentation as written explicitly says that the rules apply to both Decimal and float: The available presentation types for floating point and decimal values are But the details listed for 'g' are incorrect. We

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2015-03-01 Thread Ezio Melotti
Ezio Melotti added the comment: Should we add a note to the format docs, or just close this? -- nosy: +ezio.melotti, mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23460 ___

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2015-02-14 Thread Stefan Krah
Stefan Krah added the comment: For Decimal the cutoff point is -6 instead of -4 (following the decimal specification instead of the C standard). -- assignee: - docs@python components: +Documentation -Library (Lib) nosy: +docs@python, skrah type: behavior -

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2015-02-13 Thread Ian Kelly
New submission from Ian Kelly: '{:g}'.format(D('0.01')) '0.01' Formatted with '{:e}', the exponent would be -6, so per the formatting rules described under the 'g' specifier at https://docs.python.org/3/library/string.html#format-specification-mini-language the above should be