【发布时间】:2018-09-13 23:01:22
【问题描述】:
当您使用 help(int) 获取 int 类型的帮助字符串时。最后一部分是:
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
所以这些是复杂类型和分数类的属性,那么为什么在此处列出与整数相关的它们。是某种类型的全局数据描述符吗?
【问题讨论】:
标签: python int code-documentation