summaryrefslogtreecommitdiffstats
path: root/Doc/library/doctest.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-11-29 17:41:05 (GMT)
committerGeorg Brandl <georg@python.org>2007-11-29 17:41:05 (GMT)
commit5c10664043448f1d27d7ce7eb67c2afe3f54b018 (patch)
treea5b3ada6978c46dc179e97011c02031bb4e9344e /Doc/library/doctest.rst
parentba956aebb96c38f1b8818189ed6ab18d5441313a (diff)
downloadcpython-5c10664043448f1d27d7ce7eb67c2afe3f54b018.zip
cpython-5c10664043448f1d27d7ce7eb67c2afe3f54b018.tar.gz
cpython-5c10664043448f1d27d7ce7eb67c2afe3f54b018.tar.bz2
Remove further mentions of long integers.
Diffstat (limited to 'Doc/library/doctest.rst')
-rw-r--r--Doc/library/doctest.rst16
1 files changed, 2 insertions, 14 deletions
diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst
index df1f6e3..721d7c0 100644
--- a/Doc/library/doctest.rst
+++ b/Doc/library/doctest.rst
@@ -38,17 +38,10 @@ Here's a complete but small example module::
def factorial(n):
"""Return the factorial of n, an exact integer >= 0.
- If the result is small enough to fit in an int, return an int.
- Else return a long.
-
>>> [factorial(n) for n in range(6)]
[1, 1, 2, 6, 24, 120]
- >>> [factorial(long(n)) for n in range(6)]
- [1, 1, 2, 6, 24, 120]
>>> factorial(30)
- 265252859812191058636308480000000L
- >>> factorial(30L)
- 265252859812191058636308480000000L
+ 265252859812191058636308480000000
>>> factorial(-1)
Traceback (most recent call last):
...
@@ -60,7 +53,7 @@ Here's a complete but small example module::
...
ValueError: n must be exact integer
>>> factorial(30.0)
- 265252859812191058636308480000000L
+ 265252859812191058636308480000000
It must also not be ridiculously large:
>>> factorial(1e100)
@@ -109,11 +102,6 @@ it's trying, and prints a summary at the end::
Expecting:
[1, 1, 2, 6, 24, 120]
ok
- Trying:
- [factorial(long(n)) for n in range(6)]
- Expecting:
- [1, 1, 2, 6, 24, 120]
- ok
And so on, eventually ending with::