summaryrefslogtreecommitdiff
path: root/portato/gui
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-07-03 13:04:25 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-07-03 13:04:25 +0200
commit0ee0562e55638df69905d42bf7dfa0df7465bff9 (patch)
tree9321dce64d6a533434d3b6bce31c0c03e5ed1b45 /portato/gui
parentd0b370300b92883f34485f0b4875f9966bf61116 (diff)
downloadportato-0ee0562e55638df69905d42bf7dfa0df7465bff9.tar.gz
portato-0ee0562e55638df69905d42bf7dfa0df7465bff9.tar.bz2
portato-0ee0562e55638df69905d42bf7dfa0df7465bff9.zip
Use __slots__ for the PkgData class to save memory
Diffstat (limited to '')
-rw-r--r--portato/gui/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/portato/gui/utils.py b/portato/gui/utils.py
index 035d1c6..fd858e9 100644
--- a/portato/gui/utils.py
+++ b/portato/gui/utils.py
@@ -132,7 +132,8 @@ class Config (ConfigParser):
ConfigParser.write(self)
self.modify_external_configs()
-class PkgData:
+class PkgData (object):
+ __slots__ = ("cat", "pkg", "inst")
def __init__ (self, cat, pkg, inst):
self.cat = cat
@@ -146,7 +147,7 @@ class PkgData:
return cmp(self.pkg.lower(), other.pkg.lower())
def __repr__ (self):
- return "<Package (%(cat)s, %(pkg)s, %(inst)s)>" % self.__dict__
+ return "<Package (%(cat)s, %(pkg)s, %(inst)s)>" % {"cat" : self.cat, "pkg" : self.pkg, "inst" : self.inst}
class Database (object):
"""An internal database which holds a simple dictionary cat -> [package_list]."""
log/log.go?h=v0.5.1&id=99c5ba31e854ae25e4990313096f818b7e0367da&follow=1'>Use our own logger for debug for convenience sakeRené 'Necoro' Neumann1-2/+3 2020-04-19Fix debug logging m(René 'Necoro' Neumann1-2/+2 2020-04-19Rename util.go to log.go. Add verbose modeRené 'Necoro' Neumann4-24/+54 2020-04-19Clean go.modRené 'Necoro' Neumann2-3/+0 2020-04-19Do not print the parsedCfg anymoreRené 'Necoro' Neumann1-1/+1 2020-04-19Increase go-version to 1.14René 'Necoro' Neumann1-2/+2 2020-04-19CI: go vetRené 'Necoro' Neumann1-0/+3 2020-04-19Fetching and parsing the feedsRené 'Necoro' Neumann5-4/+113 2020-04-19Ignore all config*.ymlRené 'Necoro' Neumann1-1/+1