diff options
author | Raymond Hettinger <python@rcn.com> | 2011-05-02 18:02:13 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-05-02 18:02:13 (GMT) |
commit | a5ac2ce9825b7cf8b92a352dc614e0d8a4c41a6f (patch) | |
tree | 6d683027459286f155900280ec29a37aaaefec08 /Lib/collections.py | |
parent | 81b9656989e2acce6209184826ca135a712e3f8b (diff) | |
download | cpython-a5ac2ce9825b7cf8b92a352dc614e0d8a4c41a6f.zip cpython-a5ac2ce9825b7cf8b92a352dc614e0d8a4c41a6f.tar.gz cpython-a5ac2ce9825b7cf8b92a352dc614e0d8a4c41a6f.tar.bz2 |
Backport 3.3 fixes and cleans ups.
Diffstat (limited to 'Lib/collections.py')
-rw-r--r-- | Lib/collections.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/collections.py b/Lib/collections.py index 3693926..b904980 100644 --- a/Lib/collections.py +++ b/Lib/collections.py @@ -716,6 +716,9 @@ class _ChainMap(MutableMapping): def __contains__(self, key): return any(key in m for m in self.maps) + def __bool__(self): + return any(self.maps) + @_recursive_repr() def __repr__(self): return '{0.__class__.__name__}({1})'.format( |