summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.1.rst
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-04-17 20:55:52 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-04-17 20:55:52 (GMT)
commit1a6b73dcdf1c45d3c77959ae8a2e9ea38ebe57b2 (patch)
tree0eff97f60b7ba0b7920c7bf6392dc5401ba03f43 /Doc/whatsnew/3.1.rst
parentfd2ad8b4f2c88cba76d6b2cbca92612fc3fc8b61 (diff)
downloadcpython-1a6b73dcdf1c45d3c77959ae8a2e9ea38ebe57b2.zip
cpython-1a6b73dcdf1c45d3c77959ae8a2e9ea38ebe57b2.tar.gz
cpython-1a6b73dcdf1c45d3c77959ae8a2e9ea38ebe57b2.tar.bz2
Add porting notes.
Diffstat (limited to 'Doc/whatsnew/3.1.rst')
-rw-r--r--Doc/whatsnew/3.1.rst29
1 files changed, 29 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.1.rst b/Doc/whatsnew/3.1.rst
index 1fe2de8..e4d2a24 100644
--- a/Doc/whatsnew/3.1.rst
+++ b/Doc/whatsnew/3.1.rst
@@ -431,3 +431,32 @@ Changes to Python's build process and to the C API include:
* Deprecated :cfunc:`PyNumber_Int`. Use :cfunc:`PyNumber_Long` instead.
(Contributed by Mark Dickinson; :issue:`4910`.)
+
+Porting to Python 3.1
+=====================
+
+This section lists previously described changes and other bugfixes
+that may require changes to your code:
+
+* The new floating point string representations can break existing doctests.
+ For example::
+
+ def e():
+ '''Compute the base of natural logarithms.
+
+ >>> e()
+ 2.7182818284590451
+
+ '''
+ return sum(1/math.factorial(x) for x in reversed(range(30)))
+
+ doctest.testmod()
+
+ **********************************************************************
+ Failed example:
+ e()
+ Expected:
+ 2.7182818284590451
+ Got:
+ 2.718281828459045
+ **********************************************************************