Diferencia entre llamar a un método y acceder a un atributo
Soy muy nuevo en Python, y estoy usando Python 3.3.1.
class Parent: # define parent class
parentAttr = 100
age = 55
def __init__(self):
print ("Calling parent constructor")
def setAttr(self, attr):
Parent.parentAttr = attr
class Child(Parent):
def childMethod(self):
print ('Calling child method')
Ahora voy a crear
c=child
c.[here every thing will appear methods and attr (age,setAttr)]
¿Cómo puedo distinguir entre métodos y atributos? Quiero decir, cuando usoc.SetAtrr(Argument)
yc.SetAtrr=value
?