diff options
| author | Raymond Hettinger <python@rcn.com> | 2003-01-30 00:56:33 +0000 |
|---|---|---|
| committer | Raymond Hettinger <python@rcn.com> | 2003-01-30 00:56:33 +0000 |
| commit | 0e449234bf8e68dfe96af727e2ce7a53fb4f0dad (patch) | |
| tree | d6da9386cefa8adbe0a93b151ce70dbb976c2ed1 /Lib/lib-tk | |
| parent | 61bb35f440773d5c67f4054c5148be299232cba3 (diff) | |
| download | cpython-git-0e449234bf8e68dfe96af727e2ce7a53fb4f0dad.tar.gz | |
SF patch 672098: Three __contains__ implementations
Contributed by Jp Calderone.
Diffstat (limited to 'Lib/lib-tk')
| -rw-r--r-- | Lib/lib-tk/Canvas.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/lib-tk/Canvas.py b/Lib/lib-tk/Canvas.py index ed4ba348cc..ae2ced1801 100644 --- a/Lib/lib-tk/Canvas.py +++ b/Lib/lib-tk/Canvas.py @@ -39,6 +39,8 @@ class CanvasItem: return self._keys def has_key(self, key): return key in self.keys() + def __contains__(self, key): + return key in self.keys() def addtag(self, tag, option='withtag'): self.canvas.addtag(tag, option, self.id) def bbox(self): |
