From: Zac Medico Date: Sat, 7 Aug 2010 00:16:09 +0000 (-0700) Subject: Implement ExtendedAtomDict.__len__(). X-Git-Tag: v2.2_rc68~371 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0395c698afd27f5ae5ea2dbc20c61979097bc1dd;p=portage.git Implement ExtendedAtomDict.__len__(). --- diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index e0a0fffbd..0ee52218d 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -794,6 +794,9 @@ class ExtendedAtomDict(portage.cache.mappings.MutableMapping): if sys.hexversion >= 0x3000000: keys = __iter__ + def __len__(self): + return len(self._normal) + len(self._extended) + def setdefault(self, cp, default=None): if "*" in cp: return self._extended.setdefault(cp, default)