1
Python 3.x'in süper () büyüsü neden?
Python 3.x'te, super()bağımsız değişkenler olmadan çağrılabilir: class A(object): def x(self): print("Hey now") class B(A): def x(self): super().x() >>> B().x() Hey now Bu işi yapmak için, derleme zamanı sihri gerçekleştirilir, bunun bir sonucu aşağıdaki kodun (isyan supereden super_) başarısız olmasıdır: super_ = super class A(object): def x(self): print("No flipping") class B(A): …
159
python
python-3.x
super