]> granicus.if.org Git - python/commitdiff
Add more examples.
authorRaymond Hettinger <python@rcn.com>
Fri, 17 Apr 2009 18:58:06 +0000 (18:58 +0000)
committerRaymond Hettinger <python@rcn.com>
Fri, 17 Apr 2009 18:58:06 +0000 (18:58 +0000)
Doc/whatsnew/3.1.rst

index 014cc4f49ed3e4a0b93bbd21bda992c2d5833b5e..1fe2de8724480de19182b1a9fb1a83e6cd5c8240 100644 (file)
@@ -90,6 +90,10 @@ a mini-language that now includes a simple, non-locale aware way to format
 a number with a thousands separator.  That provides a way to humanize a
 program's output, improving its professional appearance and readability::
 
+    >>> format(1234567, ',d')
+    '1,234,567'
+    >>> format(1234567.89, ',.2f')
+    '1,234,567.89'
     >>> format(Decimal('1234567.89'), ',f')
     '1,234,567.89'