]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 88377 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 7 Feb 2011 23:18:52 +0000 (23:18 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 7 Feb 2011 23:18:52 +0000 (23:18 +0000)
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.
........

Doc/ACKS.txt
Doc/library/shelve.rst

index e73e35896632b07f8d34a2e6a7361dcde1e9f33b..eca54f635710be61f697782601c6659211a885a2 100644 (file)
@@ -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
index a2f9720d31c7790602df7219ba83111d114c726d..b2818141ec8d8148f570bc511a3b7fc166279e68 100644 (file)
@@ -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