master
yumoqing 2024-04-17 15:00:40 +08:00
parent 9f17573486
commit aff73f193a
1 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,13 @@ class DictObject(dict):
except KeyError:
return None
def has(self, key):
try:
v = super().__getitem__(key)
return True
except KeyError:
return False
def get_data_by_keys(self, keys):
try:
ks = keys.split('.', 1)