【笔记】Python3类型标注 发表于 2021-12-10 更新于 2024-04-19 分类于 Python学习指北 阅读次数: 前言Python3类型标注学习笔记 函数形参的标注12def 函数名(参数名:形参的数据类型): ... 构造方法的形参123class 类名: def __init__(self, 参数名:形参的数据类型): ... 返回值的标注12def 函数名() -> 返回值的数据类型: return ... 完成