From cc9856b20d6d2188b4a54c419efc68f2aa627fa6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 22 Sep 2009 22:30:49 +0000 Subject: [PATCH] Optimize SlotDict.iteritems() a little. svn path=/main/trunk/; revision=14391 --- pym/portage/cache/mappings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/portage/cache/mappings.py b/pym/portage/cache/mappings.py index 38a3bfe34..bd9f082b9 100644 --- a/pym/portage/cache/mappings.py +++ b/pym/portage/cache/mappings.py @@ -346,9 +346,10 @@ def slot_dict_class(keys, prefix="_val_"): return list(self) def iteritems(self): + prefix = self._prefix for k in self.allowed_keys: try: - yield (k, getattr(self, self._prefix + k)) + yield (k, getattr(self, prefix + k)) except AttributeError: pass -- 2.26.2