[Python-checkins] r88377 - in python/branches/py3k/Doc: ACKS.txt library/shelve.rst
antoine.pitrou
python-checkins at python.org
Tue Feb 8 00:10:33 CET 2011
Author: antoine.pitrou
Date: Tue Feb 8 00:10:33 2011
New Revision: 88377
Log:
Issue #11141: Fix the shelve documentation to use a list, not a range object.
Patch by SilentGhost.
Modified:
python/branches/py3k/Doc/ACKS.txt
python/branches/py3k/Doc/library/shelve.rst
Modified: python/branches/py3k/Doc/ACKS.txt
==============================================================================
--- python/branches/py3k/Doc/ACKS.txt (original)
+++ python/branches/py3k/Doc/ACKS.txt Tue Feb 8 00:10:33 2011
@@ -182,6 +182,7 @@
* Joakim Sernbrant
* Justin Sheehy
* Charlie Shepherd
+ * SilentGhost
* Michael Simcich
* Ionel Simionescu
* Michael Sloan
Modified: python/branches/py3k/Doc/library/shelve.rst
==============================================================================
--- python/branches/py3k/Doc/library/shelve.rst (original)
+++ python/branches/py3k/Doc/library/shelve.rst Tue Feb 8 00:10:33 2011
@@ -169,8 +169,8 @@
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
More information about the Python-checkins
mailing list