mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Merge pull request #234 from alexshavelev44/dev-2.x
enable syntax 'key in dispatcher', issue #233
This commit is contained in:
commit
2954636d42
1 changed files with 3 additions and 0 deletions
|
|
@ -22,6 +22,9 @@ class DataMixin:
|
|||
def __delitem__(self, key):
|
||||
del self.data[key]
|
||||
|
||||
def __contains__(self, key):
|
||||
return key in self.data
|
||||
|
||||
def get(self, key, default=None):
|
||||
return self.data.get(key, default)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue