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: "Format Specification Mini-Language" doc mistake for Decimal
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.9, Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.smith, mamrhein, mark.dickinson, mdk, miss-islington
Priority: normal Keywords: patch

Created on 2019-12-19 10:11 by mamrhein, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23537 merged mark.dickinson, 2020-11-28 11:08
PR 23550 merged miss-islington, 2020-11-29 09:35
PR 23551 merged miss-islington, 2020-11-29 09:35
PR 23575 merged mark.dickinson, 2020-11-30 19:49
PR 23831 merged miss-islington, 2020-12-18 09:24
PR 23832 merged miss-islington, 2020-12-18 09:26
Messages (11)
msg358667 - (view) Author: Michael Amrhein (mamrhein) Date: 2019-12-19 10:11
The description of the "Format Specification Mini-Language" states for float and Decimal regarding presentation type 'f':
"The default precision is 6."
Regarding presentation type None it reads:
"Similar to 'g', except that fixed-point notation, when used, has at least one digit past the decimal point."
While both statements are accurate for float, they don't hold for Decimal.
In order to preserve the information about the decimal exponent, in both cases Decimal formatting displays as many fractional digits as dictated by it's exponent.
msg358669 - (view) Author: Michael Amrhein (mamrhein) Date: 2019-12-19 10:21
For a discussion of the different behaviour of float and Decimal see https://bugs.python.org/issue39077.
msg382047 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2020-11-29 09:34
New changeset c642374b3ef72f6f300616f07aea2a3f9ed83e51 by Mark Dickinson in branch 'master':
bpo-39096: Improve description of 'e', 'f' and 'g' presentation types (#23537)
https://github.com/python/cpython/commit/c642374b3ef72f6f300616f07aea2a3f9ed83e51
msg382048 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2020-11-29 09:58
New changeset cf47b3969e21f66655fcb414ff9bfdd503069c2d by Miss Islington (bot) in branch '3.9':
bpo-39096: Improve description of 'e', 'f' and 'g' presentation types (GH-23537) (GH-23550)
https://github.com/python/cpython/commit/cf47b3969e21f66655fcb414ff9bfdd503069c2d
msg382049 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2020-11-29 09:58
New changeset c3009a5818112b5fb8867d786ce33e0e9489f4e0 by Miss Islington (bot) in branch '3.8':
bpo-39096: Improve description of 'e', 'f' and 'g' presentation types (GH-23537) (GH-23551)
https://github.com/python/cpython/commit/c3009a5818112b5fb8867d786ce33e0e9489f4e0
msg382075 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2020-11-29 16:29
These changes are a big improvement. Thanks, Mark. Should this issue be closed, or are you thinking of more changes?

Personally I think we should leave it as it is now, and open another issue if people find fault with the new docs.
msg382089 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2020-11-29 18:48
The 'default precision' issue is addressed; the issues that Michael reported about the `None` presentation type are still valid, I think.
msg382186 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2020-11-30 19:54
> Should this issue be closed, or are you thinking of more changes?

I've made one more round of changes in GH-23575. Once that's gone in, I think we can close this issue.

I don't think we're ever going to be able to make this table perfectly accurate; at best, we can achieve a series of successive approximations to the truth. (Which is pretty much what I aim for when teaching.)
msg383289 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2020-12-18 09:24
New changeset 886b2e5c7a2caf87070728dba8f18c3d65e51071 by Mark Dickinson in branch 'master':
bpo-39096: Format specification documentation fixes for numeric types (GH-23575)
https://github.com/python/cpython/commit/886b2e5c7a2caf87070728dba8f18c3d65e51071
msg383290 - (view) Author: miss-islington (miss-islington) Date: 2020-12-18 09:34
New changeset 12032cdec5ae1e56d4e4b8206fb2e9cccc5a9f58 by Miss Islington (bot) in branch '3.8':
bpo-39096: Format specification documentation fixes for numeric types (GH-23575)
https://github.com/python/cpython/commit/12032cdec5ae1e56d4e4b8206fb2e9cccc5a9f58
msg383293 - (view) Author: miss-islington (miss-islington) Date: 2020-12-18 09:49
New changeset b812e236df506603e592086269e088b00d021460 by Miss Islington (bot) in branch '3.9':
bpo-39096: Format specification documentation fixes for numeric types (GH-23575)
https://github.com/python/cpython/commit/b812e236df506603e592086269e088b00d021460
History
Date User Action Args
2022-04-11 14:59:24adminsetgithub: 83277
2020-12-18 09:49:22miss-islingtonsetmessages: + msg383293
2020-12-18 09:34:31miss-islingtonsetmessages: + msg383290
2020-12-18 09:26:33miss-islingtonsetpull_requests: + pull_request22691
2020-12-18 09:25:05mdksetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-12-18 09:24:33mdksetnosy: + mdk
messages: + msg383289
2020-12-18 09:24:27miss-islingtonsetpull_requests: + pull_request22690
2020-11-30 19:54:49mark.dickinsonsetmessages: + msg382186
2020-11-30 19:49:15mark.dickinsonsetpull_requests: + pull_request22455
2020-11-29 18:48:17mark.dickinsonsetmessages: + msg382089
2020-11-29 16:29:16eric.smithsetmessages: + msg382075
2020-11-29 09:58:38mark.dickinsonsetmessages: + msg382049
2020-11-29 09:58:06mark.dickinsonsetmessages: + msg382048
2020-11-29 09:35:12miss-islingtonsetpull_requests: + pull_request22431
2020-11-29 09:35:04miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request22430
2020-11-29 09:34:40mark.dickinsonsetmessages: + msg382047
2020-11-28 11:08:29mark.dickinsonsetkeywords: + patch
stage: patch review
pull_requests: + pull_request22419
2019-12-20 21:42:34terry.reedysettitle: Description of "Format Specification Mini-Language" not accurate for Decimal -> "Format Specification Mini-Language" doc mistake for Decimal
2019-12-19 14:26:59eric.smithsetnosy: + mark.dickinson, eric.smith
2019-12-19 10:21:19mamrheinsetmessages: + msg358669
2019-12-19 10:11:20mamrheincreate