OSCA-Kampala-Chapter / autobot

Autobot is a bot library targetted to build software bots for various platforms with ease of integration in mind
MIT License
14 stars 15 forks source link

remove slots from all telegram objects #123

Closed ToebiasHT closed 1 year ago

ToebiasHT commented 1 year ago

slots are a good way to minimize python memory in objects and speed up searching of attributes, however they impose a constraint on the attributes that can be assigned to a specific object dynamically at runtime. This would impose a great constraint on graceful adaptation of the parser if it encounters new attributes while parsing the telegram json object. Therefore we need to remove the slots and allow python to use an internal dictionary which can dynamically have new attributes and enable graceful adaptation of the parser. Removing slots will also remove the hindrances currently in building the composer.