diff options
author | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
commit | 70a6b49821a3226f55e9716f32d802d06640cb89 (patch) | |
tree | 3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Demo/classes/Dbm.py | |
parent | ecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff) | |
download | cpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2 |
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Demo/classes/Dbm.py')
-rwxr-xr-x | Demo/classes/Dbm.py | 10 |
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(): |