summaryrefslogtreecommitdiff
path: root/portato/eix
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 17:15:27 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 17:15:27 +0200
commit2da9ef4570c72d4b67121890447ac37cc5cc3749 (patch)
tree0c1054ecc7964fb4401e6b771d0f01de77b3e61d /portato/eix
parentd041a06226aec18308b846bd90ef99a744367f3e (diff)
downloadportato-2da9ef4570c72d4b67121890447ac37cc5cc3749.tar.gz
portato-2da9ef4570c72d4b67121890447ac37cc5cc3749.tar.bz2
portato-2da9ef4570c72d4b67121890447ac37cc5cc3749.zip
Add __slots__
Diffstat (limited to '')
-rw-r--r--portato/eix/parser.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/portato/eix/parser.py b/portato/eix/parser.py
index ac49789..20e1e06 100644
--- a/portato/eix/parser.py
+++ b/portato/eix/parser.py
@@ -101,6 +101,7 @@ def overlay (file, skip = False):
class LazyElement (object):
__slots__ = ("file", "get_type", "_value", "pos")
+
def __init__ (self, get_type, file):
self.file = file
self.get_type = get_type
@@ -123,6 +124,9 @@ class LazyElement (object):
return self.value
class header (object):
+ __slots__ = ("version", "ncats", "overlays", "provide",
+ "licenses", "keywords", "useflags", "slots", "sets")
+
def __init__ (self, file, skip = False):
def LE (t):
return LazyElement(t, file)
@@ -138,6 +142,9 @@ class header (object):
self.sets = LE(typed_vector(string))
class package (object):
+ __slots__ = ("offset","name", "description",
+ "provide", "homepage", "license", "useflags")
+
def __init__ (self, file, skip = False):
def LE (t):
return LazyElement(t, file)