python / python-docs-zh-cn

zh_CN translation of the Python documentation
https://docs.python.org/zh-cn/
433 stars 76 forks source link

[Typo]: 一处错误 #324

Closed yunline closed 1 year ago

yunline commented 1 year ago

Python Version

3.8

Docs Page

https://docs.python.org/zh-cn/3.8/whatsnew/3.8.html#changes-in-python-behavior

Original Translation

但 for 子句最左边的可迭代对象表达式除外

Original Docs Paragraph

aside from the iterable expression in the leftmost for clause

Suggested Fix

但最左边的 for 子句中的可迭代对象表达式除外

yunline commented 1 year ago

参考:

def gen():
    [i for i in (yield) for j in range(10)] # 不报错
def gen():
    [i for i in range(10) for j in (yield)] # SyntaxError
silkriver commented 1 year ago

fixed