mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
SF patch 672098: Three __contains__ implementations
Contributed by Jp Calderone.
This commit is contained in:
parent
61bb35f440
commit
0e449234bf
3 changed files with 7 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue