diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-07-31 11:22:27 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-07-31 11:22:27 +0200 |
| commit | d6343253aa4025376b9a8bb2b2fa140819def747 (patch) | |
| tree | 5937a4ab0a036f14d649f1fd78486c40f9738554 /apt | |
| parent | c085ac239354d78c3093049a4c48a27f514c6da2 (diff) | |
| download | python-apt-d6343253aa4025376b9a8bb2b2fa140819def747.tar.gz | |
* apt/cache.py:
- support "in" in apt.Cache() (LP: #251587)
Diffstat (limited to 'apt')
| -rw-r--r-- | apt/cache.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py index 384afe31..bbf2165b 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -101,6 +101,9 @@ class Cache(object): def has_key(self, key): return self._dict.has_key(key) + def __contains__(self, key): + return key in self._dict + def __len__(self): return len(self._dict) |
