diff --git a/telegram/base.py b/telegram/base.py index f86f1433a..db7c231a7 100644 --- a/telegram/base.py +++ b/telegram/base.py @@ -64,7 +64,8 @@ class TelegramObject(object): """ data = dict() - for key, value in self.__dict__.items(): + for key in iter(self.__dict__): + value = self.__dict__[key] if value or value == '': if hasattr(value, 'to_dict'): data[key] = value.to_dict()