Fix faq example with division.
authorEric V. Smith <eric@trueblade.com>
Mon, 14 Apr 2014 11:52:53 +0000 (07:52 -0400)
committerEric V. Smith <eric@trueblade.com>
Mon, 14 Apr 2014 11:52:53 +0000 (07:52 -0400)
Doc/faq/programming.rst

index 9f49ba8851abb5305f20e7e6de301ea6a241aec9..8dcaa3ad88c6f74512d7aab0598880420c3ffdf0 100644 (file)
@@ -732,7 +732,7 @@ To convert, e.g., the number 144 to the string '144', use the built-in type
 constructor :func:`str`.  If you want a hexadecimal or octal representation, use
 the built-in functions :func:`hex` or :func:`oct`.  For fancy formatting, see
 the :ref:`string-formatting` section, e.g. ``"{:04d}".format(144)`` yields
-``'0144'`` and ``"{:.3f}".format(1/3)`` yields ``'0.333'``.
+``'0144'`` and ``"{:.3f}".format(1.0/3.0)`` yields ``'0.333'``.
 
 
 How do I modify a string in place?