projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a399b35
)
Implement Atom.__copy__ and __deepcopy__ to return self, since instances are
author
Zac Medico
<zmedico@gentoo.org>
Sat, 12 Sep 2009 13:10:59 +0000
(13:10 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Sat, 12 Sep 2009 13:10:59 +0000
(13:10 -0000)
immutable.
svn path=/main/trunk/; revision=14223
pym/portage/dep.py
patch
|
blob
|
history
diff --git
a/pym/portage/dep.py
b/pym/portage/dep.py
index df082eb700fc0e8c488104dd460d28c03a2ba15e..cf06eca7f3d0d92783e3a49e09fe8ae5f44dca5c 100644
(file)
--- a/
pym/portage/dep.py
+++ b/
pym/portage/dep.py
@@
-657,6
+657,15
@@
class Atom(object):
def rstrip(self, *pargs, **kargs):
return self._str.rstrip(*pargs, **kargs)
+ def __copy__(self):
+ """Immutable, so returns self."""
+ return self
+
+ def __deepcopy__(self, memo=None):
+ """Immutable, so returns self."""
+ memo[id(self)] = self
+ return self
+
def get_operator(mydep):
"""
Return the operator used in a depstring.