[Python-checkins] r74404 - python/trunk/Doc/tutorial/stdlib2.rst
georg.brandl
python-checkins at python.org
Thu Aug 13 14:05:52 CEST 2009
Author: georg.brandl
Date: Thu Aug 13 14:05:52 2009
New Revision: 74404
Log:
Use locale.format_string() for more than one specifier.
Modified:
python/trunk/Doc/tutorial/stdlib2.rst
Modified: python/trunk/Doc/tutorial/stdlib2.rst
==============================================================================
--- python/trunk/Doc/tutorial/stdlib2.rst (original)
+++ python/trunk/Doc/tutorial/stdlib2.rst Thu Aug 13 14:05:52 2009
@@ -61,8 +61,8 @@
>>> 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'
More information about the Python-checkins
mailing list