mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Remove ability to access attributes via bracket notation
This commit is contained in:
parent
274650cda9
commit
4ebf5cf7e9
2 changed files with 0 additions and 12 deletions
|
|
@ -78,11 +78,5 @@ class TLObject:
|
|||
def __len__(self) -> int:
|
||||
return len(self.write())
|
||||
|
||||
def __getitem__(self, item: Any) -> Any:
|
||||
return getattr(self, item)
|
||||
|
||||
def __setitem__(self, key: Any, value: Any) -> Any:
|
||||
setattr(self, key, value)
|
||||
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any:
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -94,12 +94,6 @@ class Object(metaclass=Meta):
|
|||
|
||||
return True
|
||||
|
||||
def __getitem__(self, item):
|
||||
return getattr(self, item)
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
setattr(self, key, value)
|
||||
|
||||
def __getstate__(self):
|
||||
new_dict = self.__dict__.copy()
|
||||
new_dict.pop("_client", None)
|
||||
|
|
|
|||
Loading…
Reference in a new issue