[Python-checkins] cpython (3.4): Fix faq example with division.
eric.smith
python-checkins at python.org
Mon Apr 14 13:53:42 CEST 2014
http://hg.python.org/cpython/rev/7e66f8ecd360
changeset: 90244:7e66f8ecd360
branch: 3.4
parent: 90242:fb7bc8fe0d49
user: Eric V. Smith <eric at trueblade.com>
date: Mon Apr 14 07:52:53 2014 -0400
summary:
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