diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-06 17:16:09 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-06 17:16:09 -0700 |
commit | 0395c698afd27f5ae5ea2dbc20c61979097bc1dd (patch) | |
tree | 9dbc179d707711acbec37420bcd89a015aea6798 /pym/portage | |
parent | 29775f8cfeaff844ec4ed220dbf6da144fe37cf2 (diff) | |
download | portage-0395c698afd27f5ae5ea2dbc20c61979097bc1dd.tar.gz portage-0395c698afd27f5ae5ea2dbc20c61979097bc1dd.tar.bz2 portage-0395c698afd27f5ae5ea2dbc20c61979097bc1dd.zip |
Implement ExtendedAtomDict.__len__().
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/dep/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
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) |