上节课介绍了一些
如何定义一个抽象的类?
这节课对于学过面向对象的人比较简单,所以也就简单写了
主要介绍了几个概念
类是创建实例的模板 Class - template for creating instances of an object
数据隐藏就是指仅通过方法来访问数据 Data hiding - one can only access instance values through defined methods
Python不提供数据隐藏功能
一些python的内置方法,对象: self, __init__, __str__,
__cmp__, __eq__,
重载
Last updated 6 years ago