ID = python_ask_02
文章目录
QuestionAnswerReference
Question
Are object and instance the same?
Answer
Are they the same? My answer is NO. We say everything is object, but we never say everything is instance. Class and instance are both object.
「对象」是一个有行为的东西。 「实例」是一个模板的具象。 如楼上几位所述。实例是类的实例,而类和实例都可以是对象。 在完全面向对象的语言里,所有的东西都是对象。[1]
Reference
[1] 今天突然被人问到 object 和 instance 有什么不同