diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-02-07 23:18:52 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-02-07 23:18:52 (GMT) |
commit | ddcacf315602a7c1b0254c9015780adc92a5b96b (patch) | |
tree | 5932f34530eb2b0513b71f134ac99290cb343369 /Doc | |
parent | b248bdca9614c87ef7958bea4cc34d3cbd3ced11 (diff) | |
download | cpython-ddcacf315602a7c1b0254c9015780adc92a5b96b.zip cpython-ddcacf315602a7c1b0254c9015780adc92a5b96b.tar.gz cpython-ddcacf315602a7c1b0254c9015780adc92a5b96b.tar.bz2 |
Merged revisions 88377 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88377 | antoine.pitrou | 2011-02-08 00:10:33 +0100 (mar., 08 févr. 2011) | 4 lines
Issue #11141: Fix the shelve documentation to use a list, not a range object.
Patch by SilentGhost.
........
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/ACKS.txt | 1 | ||||
-rw-r--r-- | Doc/library/shelve.rst | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Doc/ACKS.txt b/Doc/ACKS.txt index e73e358..eca54f6 100644 --- a/Doc/ACKS.txt +++ b/Doc/ACKS.txt @@ -179,6 +179,7 @@ docs@python.org), and we'll be glad to correct the problem. * Joakim Sernbrant * Justin Sheehy * Charlie Shepherd + * SilentGhost * Michael Simcich * Ionel Simionescu * Michael Sloan diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst index a2f9720..b281814 100644 --- a/Doc/library/shelve.rst +++ b/Doc/library/shelve.rst @@ -158,8 +158,8 @@ object):: klist = list(d.keys()) # a list of all existing keys (slow!) # as d was opened WITHOUT writeback=True, beware: - d['xx'] = range(4) # this works as expected, but... - d['xx'].append(5) # *this doesn't!* -- d['xx'] is STILL range(4)! + d['xx'] = [0, 1, 2] # this works as expected, but... + d['xx'].append(3) # *this doesn't!* -- d['xx'] is STILL [0, 1, 2]! # having opened d without writeback=True, you need to code carefully: temp = d['xx'] # extracts the copy |