summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-02 14:31:35 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-02 14:31:35 -0700
commit8c2293fcda629aa58d582dc841a1f5d74a248316 (patch)
treebcd88cce395991026bf39cdb404b91d8311cec94
parent26447c46440f31a676a6079cc76b0ef81ff50a75 (diff)
downloadportage-8c2293fcda629aa58d582dc841a1f5d74a248316.tar.gz
portage-8c2293fcda629aa58d582dc841a1f5d74a248316.tar.bz2
portage-8c2293fcda629aa58d582dc841a1f5d74a248316.zip
Implement ExtendedAtomDict.copy().
-rw-r--r--pym/portage/dep/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py
index 8e2b2ef49..7475d8592 100644
--- a/pym/portage/dep/__init__.py
+++ b/pym/portage/dep/__init__.py
@@ -1232,6 +1232,12 @@ class ExtendedAtomDict(portage.cache.mappings.MutableMapping):
self._normal = {}
self._value_class = value_class
+ def copy(self):
+ result = self.__class__(self._value_class)
+ result._extended.update(self._extended)
+ result._normal.update(self._normal)
+ return result
+
def __iter__(self):
for k in self._normal:
yield k