summaryrefslogtreecommitdiffstats
path: root/Demo/classes/Dbm.py
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/classes/Dbm.py')
-rwxr-xr-xDemo/classes/Dbm.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Demo/classes/Dbm.py b/Demo/classes/Dbm.py
index 5566f99..482806a 100755
--- a/Demo/classes/Dbm.py
+++ b/Demo/classes/Dbm.py
@@ -13,7 +13,7 @@ class Dbm:
def __repr__(self):
s = ''
for key in self.keys():
- t = `key` + ': ' + `self[key]`
+ t = repr(key) + ': ' + repr(self[key])
if s: t = ', ' + t
s = s + t
return '{' + s + '}'
@@ -22,13 +22,13 @@ class Dbm:
return len(self.db)
def __getitem__(self, key):
- return eval(self.db[`key`])
+ return eval(self.db[repr(key)])
def __setitem__(self, key, value):
- self.db[`key`] = `value`
+ self.db[repr(key)] = repr(value)
def __delitem__(self, key):
- del self.db[`key`]
+ del self.db[repr(key)]
def keys(self):
res = []
@@ -37,7 +37,7 @@ class Dbm:
return res
def has_key(self, key):
- return self.db.has_key(`key`)
+ return self.db.has_key(repr(key))
def test():