]> granicus.if.org Git - python/commitdiff
Use locale.format_string() for more than one specifier.
authorGeorg Brandl <georg@python.org>
Thu, 13 Aug 2009 12:05:52 +0000 (12:05 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 13 Aug 2009 12:05:52 +0000 (12:05 +0000)
Doc/tutorial/stdlib2.rst

index 6f0a6ed22b3934db6c535ae07d7b04fcbafac9e4..0197a6fb3289fd9486bf6af7ca2ca925927094db 100644 (file)
@@ -61,8 +61,8 @@ formatting numbers with group separators::
    >>> x = 1234567.8
    >>> locale.format("%d", x, grouping=True)
    '1,234,567'
-   >>> locale.format("%s%.*f", (conv['currency_symbol'],
-   ...               conv['frac_digits'], x), grouping=True)
+   >>> locale.format_string("%s%.*f", (conv['currency_symbol'],
+   ...                      conv['frac_digits'], x), grouping=True)
    '$1,234,567.80'