Closed yunline closed 1 year ago
3.8
https://docs.python.org/zh-cn/3.8/whatsnew/3.8.html#changes-in-python-behavior
但 for 子句最左边的可迭代对象表达式除外
aside from the iterable expression in the leftmost for clause
但最左边的 for 子句中的可迭代对象表达式除外
参考:
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
fixed
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 子句中的可迭代对象表达式除外