From 0395c698afd27f5ae5ea2dbc20c61979097bc1dd Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 6 Aug 2010 17:16:09 -0700 Subject: [PATCH] Implement ExtendedAtomDict.__len__(). --- pym/portage/dep/__init__.py | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.26.2