Skip to content

Commit 4ebf5cf

Browse files
committed
Remove ability to access attributes via bracket notation
1 parent 274650c commit 4ebf5cf

2 files changed

Lines changed: 0 additions & 12 deletions

File tree

pyrogram/raw/core/tl_object.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,5 @@ def __eq__(self, other: Any) -> bool:
7878
def __len__(self) -> int:
7979
return len(self.write())
8080

81-
def __getitem__(self, item: Any) -> Any:
82-
return getattr(self, item)
83-
84-
def __setitem__(self, key: Any, value: Any) -> Any:
85-
setattr(self, key, value)
86-
8781
def __call__(self, *args: Any, **kwargs: Any) -> Any:
8882
pass

pyrogram/types/object.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,6 @@ def __eq__(self, other: "Object") -> bool:
9494

9595
return True
9696

97-
def __getitem__(self, item):
98-
return getattr(self, item)
99-
100-
def __setitem__(self, key, value):
101-
setattr(self, key, value)
102-
10397
def __getstate__(self):
10498
new_dict = self.__dict__.copy()
10599
new_dict.pop("_client", None)

0 commit comments

Comments
 (0)