From: Antoine Pitrou <solipsis@pitrou.net>
Date: Mon, 7 Feb 2011 23:10:33 +0000 (+0000)
Subject: Issue #11141: Fix the shelve documentation to use a list, not a range object.
X-Git-Tag: v3.2rc3~21
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=631507d1c6789df339b7e1115d992a9b60611121;p=python

Issue #11141: Fix the shelve documentation to use a list, not a range object.
Patch by SilentGhost.
---

diff --git a/Doc/ACKS.txt b/Doc/ACKS.txt
index bcf70b5ecb..c51d211180 100644
--- a/Doc/ACKS.txt
+++ b/Doc/ACKS.txt
@@ -182,6 +182,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 4b49a2f006..9d7d5045e2 100644
--- a/Doc/library/shelve.rst
+++ b/Doc/library/shelve.rst
@@ -169,8 +169,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