What do you think this does:
class A(object):
def aa(self):
return 'A1'
class A(object):
def aa(self):
return 'A2'
a = A()
print("%s" % a.aa())
It prints "A2".
But before you think "what's the big deal, the __dict__ of A is getting updated", how about this:
class A(object):
def aa(self):
return 'A1'
class A(object):
def bb(self
(
Read more... )
Comments 1
Not sure if the last sentence wasn't supposed to read "This is amazingly dark"
Reply
Leave a comment