S
shuvro
Suppose I have a class like this -
class myClass(object):
def __init__(self):
self.a = 10
self.b = 20
def my_method(self,var = 20):
self.local_var = var
I want to know about its method(__init__ and my_method) and
variables(a,b, local_var) without creating the object of it. I tried
getmembers function of inspect module. But it can do this with an
object of myClass as argument. Like
import inspect
var = myClass()
inspect.getmembers(var)
I have to know about this without creating the object of myClass.
Can anyone help me please?
class myClass(object):
def __init__(self):
self.a = 10
self.b = 20
def my_method(self,var = 20):
self.local_var = var
I want to know about its method(__init__ and my_method) and
variables(a,b, local_var) without creating the object of it. I tried
getmembers function of inspect module. But it can do this with an
object of myClass as argument. Like
import inspect
var = myClass()
inspect.getmembers(var)
I have to know about this without creating the object of myClass.
Can anyone help me please?