[Python-checkins] cpython (merge 3.4 -> default): Merge 3.4: Fix faq example with division.

eric.smith python-checkins at python.org
Mon Apr 14 13:53:43 CEST 2014


http://hg.python.org/cpython/rev/62c2b76df993
changeset:   90245:62c2b76df993
parent:      90243:6107a727c60a
parent:      90244:7e66f8ecd360
user:        Eric V. Smith <eric at trueblade.com>
date:        Mon Apr 14 07:53:33 2014 -0400
summary:
  Merge 3.4: Fix faq example with division.

files:
  Doc/faq/programming.rst |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst
--- a/Doc/faq/programming.rst
+++ b/Doc/faq/programming.rst
@@ -732,7 +732,7 @@
 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?

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list