PEP 682: clarify specification (#2327)

This commit is contained in:
John Belmonte 2022-02-16 09:00:42 +09:00 committed by GitHub
parent 4ba57570ad
commit 62eede8d27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -134,7 +134,10 @@ where ``z`` is allowed for floating-point presentation types (``f``, ``g``,
etc., as defined by the format specification documentation). Support for
``z`` is provided by the ``.__format__()`` method of each numeric type,
allowing the specifier to be used in f-strings, built-in ``format()``, and
``str.format()``. The %-formatting style will not support the new option.
``str.format()``.
When ``z`` is present, negative zero (whether the original value or the
result of rounding) will be normalized to positive zero.
Synopsis::