I have a class like the one given below:
class Someclass(object):
def __init__(self, n1=5, n2=12):
self.n1 = n1
self.n2 = n2
I will like to use the arguments of __init__
from the aforementioned class in a function which I am defining in the following manner:
def Search(model: Someclass):
n11 = 10
n22 = 20
print( type(model.__init__), type(model) )
# I want to multiply self.n1 with n11 , and self.n2 with n22 using this function.
Search(Someclass)
>> <class 'function'> <class 'type'>
How can I access elements in __init__
constructor in Someclass
inside Search
?