mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
enable syntax 'key in dispatcher', issue #233
This commit is contained in:
parent
39d3731a48
commit
b9130e2e1c
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