class test:
def __init__(self, token):
self.token = token
def t(self):
print(self.token)
class longpoll(test):
def __init__(self, token):
self.access = token
super(longpoll, self).__init__(token)
from longpoll import longpoll
at = ''
bot = longpoll(at)
longpoll.t()
Traceback (most recent call last):
File "example.py", line 6, in <module>
longpoll.t()
TypeError: t() missing 1 required positional argument: 'self'
bot.t()
longpoll.t(bot) # bot это и будет self в методе t