Object-Based Programming--python
时间:2010-08-24 来源:菜刀大侠
<<DEITEL - Python How to Program 2002>>
Objectives
目标:
• To understand the software-engineering concepts of “encapsulation” and “data hiding.”
为了理解封装和数据隐藏的软件工程概念
• To understand the notions of data abstraction and abstract data types (ADTs).
为了理解数据抽象和抽象数据类型ADT的概念
• To create Python ADTs, namely classes.
为了建立python ADT,也即“类”
• To understand how to create, use and destroy objects of a class.
为了理解怎样去建立、使用和销毁一个类的诸多对象
• To control access to object attributes and methods.
为了控制对象属性和方法的访问
• To begin to appreciate the value of object orientation.
开始感受面向对象编程的价值
My object all sublime I shall achieve in time.
W. S. Gilbert
Is it a world to hide virtues in?
William Shakespeare, Twelfth Night
Your public servants serve you right.
Adlai Stevenson
Classes struggle, some classes triumph, others are eliminated.
Mao Zedong
This above all: to thine own self be true.
William Shakespeare, Hamlet