diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/includes/mp_pool.py | 6 | ||||
-rw-r--r-- | Doc/library/os.rst | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Doc/includes/mp_pool.py b/Doc/includes/mp_pool.py index 46eac5a..e360703 100644 --- a/Doc/includes/mp_pool.py +++ b/Doc/includes/mp_pool.py @@ -98,17 +98,17 @@ def test(): t = time.time() A = list(map(pow3, range(N))) - print('\tmap(pow3, xrange(%d)):\n\t\t%s seconds' % \ + print('\tmap(pow3, range(%d)):\n\t\t%s seconds' % \ (N, time.time() - t)) t = time.time() B = pool.map(pow3, range(N)) - print('\tpool.map(pow3, xrange(%d)):\n\t\t%s seconds' % \ + print('\tpool.map(pow3, range(%d)):\n\t\t%s seconds' % \ (N, time.time() - t)) t = time.time() C = list(pool.imap(pow3, range(N), chunksize=N//8)) - print('\tlist(pool.imap(pow3, xrange(%d), chunksize=%d)):\n\t\t%s' \ + print('\tlist(pool.imap(pow3, range(%d), chunksize=%d)):\n\t\t%s' \ ' seconds' % (N, N//8, time.time() - t)) assert A == B == C, (len(A), len(B), len(C)) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 206a15c..2548b70 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -396,7 +396,7 @@ by file descriptors. Close all file descriptors from *fd_low* (inclusive) to *fd_high* (exclusive), ignoring errors. Availability: Unix, Windows. Equivalent to:: - for fd in xrange(fd_low, fd_high): + for fd in range(fd_low, fd_high): try: os.close(fd) except OSError: |