mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Empty list optimization, Py2 arteacts removed,
Empty list optimization: None instead of []. Py2 arteacts removed: no more six moudle used.
This commit is contained in:
@ -7,8 +7,6 @@ try:
|
||||
except ImportError:
|
||||
import json
|
||||
|
||||
import six
|
||||
|
||||
from telebot import util
|
||||
|
||||
DISABLE_KEYLEN_ERROR = False
|
||||
@ -81,13 +79,13 @@ class JsonDeserializable(object):
|
||||
|
||||
def __str__(self):
|
||||
d = {}
|
||||
for x, y in six.iteritems(self.__dict__):
|
||||
for x, y in self.__dict__.items():
|
||||
if hasattr(y, '__dict__'):
|
||||
d[x] = y.__dict__
|
||||
else:
|
||||
d[x] = y
|
||||
|
||||
return six.text_type(d)
|
||||
return str(d)
|
||||
|
||||
|
||||
class Update(JsonDeserializable):
|
||||
|
Reference in New Issue
Block a user