class Test:
def __init__(self, value):
self.some_attribute = value
def hello(self):
print(self.some_attribute)
Test.hello
Is it possible to get the type of the class when passing Test.hello as an argument in a function? At a later time I want to be able to use the constructor of class Test, and then invoke the method hello on the instance.
I know that what I want is possible like this:
Test.hello(Test("test"))
However I'm not sure how i can extract the from Test.hello when it is passed like an argument.