python 声明变量但不赋值 的语法
LIST: list
使用之前需要赋值,否则报错.
实际使用场景,见pandas\core\frame.py 9233行:
index: "Index" = properties.AxisProperty(
axis=1, doc="The index (row labels) of the DataFrame."
) # 声明index,类型为 properties.AxisProperty类
"Index" 的含义暂时不清楚
LIST: list
使用之前需要赋值,否则报错.
实际使用场景,见pandas\core\frame.py 9233行:
index: "Index" = properties.AxisProperty(
axis=1, doc="The index (row labels) of the DataFrame."
) # 声明index,类型为 properties.AxisProperty类
"Index" 的含义暂时不清楚