I am curious how python class/instance method connects
and I make a class with three methods (instance/class/static)
class Asian_loser(object):
def kerker(self):
w=1
@classmethod
def loss(self):
print 123
@staticmethod
def wwww():
print 123
and see its' id
print(id(Asian_loser.loss))
print(id(Asian_loser.kerker))
print(id(Asian_loser.wwww))
the loss and kerker method id will be the same and vary for a few seconds later
and I make a instance from Asian_loser
w=Asian_loser()
print(id(w.kerker))
print(id(w.loss))
print(id(w.wwww))
the loss and kerker method id will be the same and vary for a few seconds later
just want to know what accutally happen