]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Improve number formatting example
authorAarni Koskela <akx@iki.fi>
Tue, 25 Jan 2022 13:50:12 +0000 (15:50 +0200)
committerAarni Koskela <akx@iki.fi>
Tue, 25 Jan 2022 14:40:00 +0000 (16:40 +0200)
Fixes #575

docs/numbers.rst

index 058d79e1869162acc6e2d6bfd498e3920a4fe75a..ed3b60f13da68a570b1f14d56277cdc59b9cfec6 100644 (file)
@@ -18,13 +18,16 @@ Examples:
 
 .. code-block:: pycon
 
+    # Numbers with decimal places
     >>> format_decimal(1.2345, locale='en_US')
     u'1.234'
     >>> format_decimal(1.2345, locale='sv_SE')
     u'1,234'
+    # Integers with thousand grouping
     >>> format_decimal(12345, locale='de_DE')
     u'12.345'
-
+    >>> format_decimal(12345678, locale='de_DE')
+    u'12.345.678'
 
 Pattern Syntax
 ==============