diff --git a/pep-0515.txt b/pep-0515.txt index cd3548dd9..531b1a1b6 100644 --- a/pep-0515.txt +++ b/pep-0515.txt @@ -83,6 +83,20 @@ the following constructors: - ``complex()`` - ``Decimal()`` +Further changes +--------------- + +The new-style number-to-string formatting language will be extended to +allow ``_`` as a thousands separator, where currently only ``,`` is +supported. This can be used to easily generate code with more +readable literals. [11]_ + +The syntax would be the same as for the comma, e.g. ``{:10_}`` for a +width of 10 with ``_`` separator. + +For the ``b``, ``x`` and ``o`` format specifiers, ``_`` will be +allowed and group by 4 digits. + Prior Art ========= @@ -149,15 +163,6 @@ introduce ambiguity with user-defined literals), which is not considered because of the use in Python's string literals. [1]_ -Open Proposals -============== - -It has been proposed [11]_ to extend the number-to-string formatting -language to allow ``_`` as a thousans separator, where currently only -``,`` is supported. This could be used to easily generate code with -more readable literals. - - Implementation ==============