Python 类 是返回值方法吗?

Are Python classes returning value methods?

Python中的class是返回值方法吗?

有人问我以下问题:

"以下哪个表示定义相同类型对象的模板、蓝图或契约?:class定义、返回值方法、class实例或none 以上

我知道 class 是定义相同类型对象的蓝图,但我不确定 class 是否是返回值方法。

return取值方法只是选项之一,实际问题从来没有提及它们。

关于你原来的问题,我会说 Python class 是 returning 值方法,但 returning 值方法不是 Python class。 Python 中的 class 确实 return 一个值,即通过该 class 创建的对象,但 returning 值方法(如函数)不是蓝图对于对象。