Python中的对象和类有什么区别 [英] What is the difference between objects and classes in Python
本文介绍了Python中的对象和类有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是一个自学成才的 Python 用户(有点.).我阅读了很多书来加深我对 Python 的了解.今天
I am a self-taught python user (kind of.). I read much to deepen my knowledge about python. Today
我遇到一条文字说:
...类和对象....
... classes and objects ....
所以我想知道python中的对象和类之间有什么区别.我教过所有的类都是对象,但在那种情况下,作者不会使用短语类和对象".我很困惑...
So I was wondering what is the difference between objects and classes in python. I taught all classes are objects, but in that case, author wouldn't have used phrase "classes and objects". I'm confused...
推荐答案
这是面向对象编程中两个密切相关的术语.标准含义是 object 是 class 的实例.
These are two closely related terms in object oriented programming. The standard meaning is that an object is an instance of a class.
这篇关于Python中的对象和类有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文