diff options
author | Raymond Hettinger <python@rcn.com> | 2011-01-01 22:38:00 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-01-01 22:38:00 (GMT) |
commit | 32062e9be78ee49b563d1b7eb290a00e6fe16c0f (patch) | |
tree | bff5fdfbf490eb0447c9e1ad19e3816f82e07f91 /Lib/collections.py | |
parent | 60db46758fa4dd5786a17226794c8b1eaa3c6094 (diff) | |
download | cpython-32062e9be78ee49b563d1b7eb290a00e6fe16c0f.zip cpython-32062e9be78ee49b563d1b7eb290a00e6fe16c0f.tar.gz cpython-32062e9be78ee49b563d1b7eb290a00e6fe16c0f.tar.bz2 |
Make it easier to extend OrderedDict without breaking it.
Diffstat (limited to 'Lib/collections.py')
-rw-r--r-- | Lib/collections.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/collections.py b/Lib/collections.py index c69f4ca..d0a44c2 100644 --- a/Lib/collections.py +++ b/Lib/collections.py @@ -52,7 +52,7 @@ class OrderedDict(dict, MutableMapping): self.__root = root = _proxy(self.__hardroot) root.prev = root.next = root self.__map = {} - self.update(*args, **kwds) + self.__update(*args, **kwds) def __setitem__(self, key, value, dict_setitem=dict.__setitem__, proxy=_proxy, Link=_Link): @@ -171,7 +171,7 @@ class OrderedDict(dict, MutableMapping): size += sizeof(self.__root) * n # proxy objects return size - update = MutableMapping.update + update = __update = MutableMapping.update pop = MutableMapping.pop keys = MutableMapping.keys values = MutableMapping.values |