bpo-39096: Format specification documentation fixes for numeric types#23575
Conversation
| | | ``nan`` to ``NAN`` and ``inf`` to ``INF``. | | ||
| +---------+----------------------------------------------------------+ | ||
| | ``'g'`` | General format. For a given precision ``p >= 1``, | | ||
| | ``'g'`` | General format. For a given precision ``p >= 1``, | |
There was a problem hiding this comment.
The change in this line was a bit gratuitous. Happy to revert on demand.
There was a problem hiding this comment.
I personally don't care about double spaces between sequences from a readability point of view (but I think some people care, I mean, the double space was added on purpose).
However, this diff will flag the sentence as fuzzy (to review) in all documentation translations, so it'll cost time to ~8 persons. From this point of view, it's better to revert it.
There was a problem hiding this comment.
Ah, good point. Thanks, @JulienPalard. Now fixed.
ericvsmith
left a comment
There was a problem hiding this comment.
That looks good to me. Thanks, Mark.
JulienPalard
left a comment
There was a problem hiding this comment.
The space appart (sorry for the nitpicking), it looks very good to me!
|
When you're done making the requested changes, leave the comment: |
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @ericvsmith, @JulienPalard: please review the changes made to this pull request. |
|
@JulienPalard: Okay to merge? |
|
Thanks @mdickinson for the PR, and @JulienPalard for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
|
Sorry @mdickinson and @JulienPalard, I had trouble checking out the |
|
Thanks @mdickinson ! |
|
GH-23831 is a backport of this pull request to the 3.8 branch. |
…pythonGH-23575) (cherry picked from commit 886b2e5) Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
|
Thanks @mdickinson for the PR, and @JulienPalard for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9. |
…pythonGH-23575) (cherry picked from commit 886b2e5) Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
|
GH-23832 is a backport of this pull request to the 3.9 branch. |
This is a follow-up to #23537. It revises the text for the
gpresentation type and theNonepresentation type forfloatandDecimalinstances.For the
gtype, I've moved some pieces of the existing text around in an attempt to improve the flow (for example, the piece about precision0being the same as precision1is now closer to the "precision p >= 1" part), and I've attempted to give a more accurate description of the behaviour of theDecimaltype forgwith no given precision. It's still not completely accurate in some details (for example, in the handling of zeros like0E-6and0E-8, the first of which is formatted in fixed-point notation). But I'm not sure that attempting a full, completely accurate, specification in this table is feasible.For the
Nonetype, it should now be clearer that the "at least one digit past the decimal point" part applies only tofloat, not toDecimal.https://bugs.python.org/issue39096