P
piyush.subscription
hi,
i am a newbie. so bear wth me
i wrote a program like this
--
class H(object):
def __init__( self):
self.data =10
def e ( self ):
pass
def f ( self ):
pass
class H1(H):
x2 = 11
def __init__(self):
self.x = 10
class details(object):
def data(self,className):
print classname.__dict__
print classname.__name__
print classname.__bases__
bc = details()
bc.data(H1)
when i run it, i get error like this
NameError: global name 'classname' is not defined
can't i pass 'class' like an 'object'?
any suggestions to access other classes details inside a class?
i am a newbie. so bear wth me
i wrote a program like this
--
class H(object):
def __init__( self):
self.data =10
def e ( self ):
pass
def f ( self ):
pass
class H1(H):
x2 = 11
def __init__(self):
self.x = 10
class details(object):
def data(self,className):
print classname.__dict__
print classname.__name__
print classname.__bases__
bc = details()
bc.data(H1)
when i run it, i get error like this
NameError: global name 'classname' is not defined
can't i pass 'class' like an 'object'?
any suggestions to access other classes details inside a class?