class test:
def __init__(self):
self.test = "test",
self._test()
def _test(self):
print(f"test! {self.test}")
class testedby:
async def testedby_deffunc(self):
return self.testfrom test import test
i = test()
settings = i.testedby.testedby_deffunc()settings = i.testedby.testedby_deffunc()
TypeError: i.testedby.testedby_deffunc() missing 1 required positional argument: 'self'class A:
def __init__(self):
self.test = 'test'
class B:
@classmethod
def test(self):
return A().test
print(A().B.test()) Но код совершенно, бесполезный, точнее сказать абсурдный лучше бы ты привел простенький пример, что ты пытаешься сделать, было бы больше толку.