Inheritance: For Good or For Worse

Posted neozheng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Inheritance: For Good or For Worse相关的知识,希望对你有一定的参考价值。

1. Subclassing Built-In Types Is Tricky

Since Python 2.2, subclassing built-in types such as list or dict can be done but there is a major caveat: the code of the built-ins (written in C) does not call special methods overridden by user-defined classes.

 

 

 

 

 

 

 

 

end...

以上是关于Inheritance: For Good or For Worse的主要内容,如果未能解决你的问题,请参考以下文章