summaryrefslogtreecommitdiffstats
path: root/Lib/shelve.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-12-04 11:12:43 (GMT)
committerGeorg Brandl <georg@python.org>2010-12-04 11:12:43 (GMT)
commit732324a3f86a352217b01ae2438b6db7691ae0b1 (patch)
tree8751b652a09b2fe8ac354edd571c431210dda3b2 /Lib/shelve.py
parentc9fb3c64177f8efefd18a11f86bcf2f94d0f7c90 (diff)
downloadcpython-732324a3f86a352217b01ae2438b6db7691ae0b1.zip
cpython-732324a3f86a352217b01ae2438b6db7691ae0b1.tar.gz
cpython-732324a3f86a352217b01ae2438b6db7691ae0b1.tar.bz2
#7905: Actually respect the keyencoding parameter to shelve.Shelf.
Diffstat (limited to 'Lib/shelve.py')
-rw-r--r--Lib/shelve.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/shelve.py b/Lib/shelve.py
index 52e471a..cc1815e 100644
--- a/Lib/shelve.py
+++ b/Lib/shelve.py
@@ -73,6 +73,7 @@ class _ClosedDict(collections.MutableMapping):
def __repr__(self):
return '<Closed Dictionary>'
+
class Shelf(collections.MutableMapping):
"""Base class for shelf implementations.
@@ -88,7 +89,7 @@ class Shelf(collections.MutableMapping):
self._protocol = protocol
self.writeback = writeback
self.cache = {}
- self.keyencoding = "utf-8"
+ self.keyencoding = keyencoding
def __iter__(self):
for k in self.dict.keys():