X Tutup
Skip to content

Commit 8ff8d57

Browse files
committed
TelegramObject.to_dict(): use iterators
1 parent e9a782a commit 8ff8d57

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

telegram/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def to_dict(self):
6464
"""
6565
data = dict()
6666

67-
for key, value in self.__dict__.items():
67+
for key in iter(self.__dict__):
68+
value = self.__dict__[key]
6869
if value or value == '':
6970
if hasattr(value, 'to_dict'):
7071
data[key] = value.to_dict()

0 commit comments

Comments
 (0)
X Tutup