摘要: ```python 在 PyCharm 中,你可以通过以下步骤实现这一目标: 打开 PyCharm,点击顶部菜单的 "File"(文件) -> "Settings"(设置)。 在弹出的窗口中,选择 "Editor"(编辑器) -> "Live Templates"(代码模板)。 在左侧的列表中,选择 阅读全文
posted @ 2023-08-28 12:10 我在路上回头看 阅读(225) 评论(0) 推荐(0) 编辑
摘要: from collections.abc import Callable """ Callable[[ParamType1, ParamType2], ReturnType] [参数1类型,参数2类型], 返回值类型 Callable[[], int] 是 Callable[[], float] 的 阅读全文
posted @ 2023-08-28 11:05 我在路上回头看 阅读(45) 评论(0) 推荐(0) 编辑
摘要: ```python from collections.abc import Iterable from typing import TypeAlias FromTo = tuple[str, str] # 3.10之前 FromTo: TypeAlias = tuple[str, str] # 3. 阅读全文
posted @ 2023-08-28 08:44 我在路上回头看 阅读(14) 评论(0) 推荐(0) 编辑