[英]Why isn't the “object” parent class for new-style classes in Python2.x written as “Object”?
Maybe I have the wrong impression, but wouldn't the parent class of a class
object be a class? 也许我有错误的印象,但是class
对象的父类不是一个类吗? If so, why didn't the authors of Python follow good style convention and capitalize the object
class to Object
to denote it as a class object? 如果是这样,为什么Python的作者不遵循良好的样式约定并将object
类大写为Object
以将其表示为类对象? Is it a class at all ? 它是一个类吗?
它遵循内置类型( str
, int
, float
, complex
, file
, type
等)的约定, 没有首字母大写。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.