master
yumoqing 2024-04-07 11:28:01 +08:00
parent fa32e0ac96
commit 3d7e4a4fd6
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,10 @@ class DictObject(dict):
except KeyError:
return None
def __getitem__(self, key):
v = super().__getitem__(key)
return self.__DOitem(v)
def __setattr__(self, attr, value):
"""
实现点操作符设置字典中的键值对