This commit is contained in:
yumoqing 2024-04-17 15:00:40 +08:00
parent 9f17573486
commit aff73f193a

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)