This commit is contained in:
jxxghp
2023-07-29 16:19:35 +08:00
parent 891eaf2c12
commit cec6dedefe
3 changed files with 9 additions and 4 deletions

View File

@ -36,6 +36,9 @@ class AsObj:
def _dict(self):
return {k: v for k, v in self.__dict__.items() if not k.startswith("_")}
def to_dict(self):
return self._dict()
def __delitem__(self, key):
return delattr(self, key)