datamachine / twx.botapi

Unofficial Telegram Bot API Client
MIT License
238 stars 46 forks source link

Old-style classes #15

Closed jlmadurga closed 7 years ago

jlmadurga commented 8 years ago

Is there any reason to use old-style classes? I was trying to inherit from TelegramBot and found the super issue: TypeError: must be type, not classobj related to. I fixed not using super but I think it is recommended to use new-style.

FichteFoll commented 8 years ago

You must use Python 3 anyway, afaik.

Actually, according to the readme it supports 2.7 too, but ... I wouldn't be too sure about that. If you use 3 you're definitely on the safe side though.

jlmadurga commented 8 years ago

I am using 2.7 and it works fine at least as far I have tested. Receiving and sending text messages.

FichteFoll commented 8 years ago

Well, it's good practise to always inherit from object anyway, for this kind of backwards compatability.