From: Zac Medico Date: Sun, 17 Jun 2012 16:16:15 +0000 (-0700) Subject: DependencyArg: add __slots__ X-Git-Tag: v2.2.0_alpha111~35 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=525988ac9a74c75dff19a89887c44ea280628d3f;p=portage.git DependencyArg: add __slots__ --- diff --git a/pym/_emerge/AtomArg.py b/pym/_emerge/AtomArg.py index a929b433e..343d7aaab 100644 --- a/pym/_emerge/AtomArg.py +++ b/pym/_emerge/AtomArg.py @@ -1,10 +1,13 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from portage._sets.base import InternalPackageSet from _emerge.DependencyArg import DependencyArg class AtomArg(DependencyArg): + + __slots__ = ('atom', 'pset') + def __init__(self, atom=None, **kwargs): DependencyArg.__init__(self, **kwargs) self.atom = atom diff --git a/pym/_emerge/DependencyArg.py b/pym/_emerge/DependencyArg.py index 861d83754..fa1a47fb7 100644 --- a/pym/_emerge/DependencyArg.py +++ b/pym/_emerge/DependencyArg.py @@ -1,4 +1,4 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import sys @@ -6,6 +6,9 @@ import sys from portage import _encodings, _unicode_encode, _unicode_decode class DependencyArg(object): + + __slots__ = ('arg', 'root_config') + def __init__(self, arg=None, root_config=None): self.arg = arg self.root_config = root_config diff --git a/pym/_emerge/SetArg.py b/pym/_emerge/SetArg.py index 94cf0a6ce..5c8297547 100644 --- a/pym/_emerge/SetArg.py +++ b/pym/_emerge/SetArg.py @@ -1,9 +1,12 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from _emerge.DependencyArg import DependencyArg from portage._sets import SETPREFIX class SetArg(DependencyArg): + + __slots__ = ('name', 'pset') + def __init__(self, pset=None, **kwargs): DependencyArg.__init__(self, **kwargs) self.pset = pset