Skip to content

Commit 79093e5

Browse files
whg517claude
andauthored
docs: 同步 Python 规范至 Google Python Style Guide 最新版 (#42)
* docs: 同步 Python 语言规范和风格规范至 Google 最新原文 基于 Google Python Style Guide 最新版本同步翻译文档,修复以下问题: language_rules.md: - 移除或修正与原文不一致的内容 - 补充遗漏的关键说明(如 self/cls 限定、generator_stop 示例) - 修复笔误和链接 - 更新代码示例以匹配原文 style_rules.md: - 同步 @OverRide 三种使用场景 - 更新循环累加示例格式 - 补充"避免缩写"命名规则 - 移除捏造的代码示例 - 类型标注现代化(Optional[X] → X | None) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: 深度同步 Python 规范翻译与 Google 最新原文的差异 基于 pyguide.md 原文逐节对比,修正翻译与原文的遗漏和不一致。 language_rules.md: - §1.2: 保留 features 代码标识符而非误译为"功能" - §1.11: 补充"三元运算符"定义,修正"不推荐"示例换行 - §1.18: 修正 queue 模块名大小写 - §1.20: 修正错别字,决策段落与上游同步 style_rules.md: - §3.7: PEP-394 链接改为直链 - §3.8.2: one-line 连字符及缩进修正 - §3.8.3: 补充 Yields 生成器说明 - §3.10: 更新字符串累积示例,补充隐式拼接示例 - §3.11: 修正 h5py 链接,补充"卸载文件系统" - §3.12: TODO 格式与上游同步 - §3.13: 补充 collections.abc 导入例外 - §3.16.1: 补充数学符号命名例外 - §3.16.2: 补充单元测试访问受保护常量说明 - §3.19.10: unicode → str 术语更新 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e840bcd commit 79093e5

2 files changed

Lines changed: 231 additions & 126 deletions

File tree

0 commit comments

Comments
 (0)