summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-04-17 18:58:06 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-04-17 18:58:06 (GMT)
commit0422e141557a8bb59a9634f205b49478e78b19f7 (patch)
tree4f797c8cea0e8a5b6a3abf166122086e7ccfe9a2 /Doc/whatsnew
parentb687e763eb70c4df36fd5cd9aa5960a5237fa28f (diff)
downloadcpython-0422e141557a8bb59a9634f205b49478e78b19f7.zip
cpython-0422e141557a8bb59a9634f205b49478e78b19f7.tar.gz
cpython-0422e141557a8bb59a9634f205b49478e78b19f7.tar.bz2
Add more examples.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.1.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.1.rst b/Doc/whatsnew/3.1.rst
index 014cc4f..1fe2de8 100644
--- a/Doc/whatsnew/3.1.rst
+++ b/Doc/whatsnew/3.1.rst
@@ -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'