4
這個問題從以下question得出,假設class B
延伸class A
Python的超(級,個體經營)。方法VS超(家長,個體經營)。方法
class A(object):
def do_work(self):
print 123
class B(A):
def do_work(self):
super(B,self).do_work() # versus the next statement
super(A,self).do_work() # what's the difference?
如果做超(A,self).do_work不是要走的路,那麼我該如何解決這個問題呢? http://stackoverflow.com/questions/14739809/django-overwriting-modelform-save-causes-recursion謝謝! –
@JamesLin在這個問題上增加了一個答案。 – Amber