From 525988ac9a74c75dff19a89887c44ea280628d3f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 17 Jun 2012 09:16:15 -0700 Subject: [PATCH] DependencyArg: add __slots__ --- pym/_emerge/AtomArg.py | 5 ++++- pym/_emerge/DependencyArg.py | 5 ++++- pym/_emerge/SetArg.py | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) 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 -- 2.26.2