➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 lukasz.langa
收信人 Julian, barry, benjamin.peterson, eric.araujo, ezio.melotti, georg.brandl, ishimoto, lukasz.langa, ncoghlan, r.david.murray, serhiy.storchaka, steven.daprano, ulope
日期 2018-09-28.13:50:45
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1538142645.37.0.545547206417.issue12782@psf.upfronthosting.co.za>
In-reply-to
内容
This was closed without enough explanation. Suggesting people should use ExitStack due to a Python grammar deficiency is suboptimal to say the least.

This problem is coming back to users of Black due to Black's removal of backslashes. It's the only piece of our grammar where backslashes are required for readability which shows there's something wrong.

The syntax ambiguity that Nick is raising fortunately shouldn't be a problem because a single tuple is an invalid context manager. In other contexts if the organizational parentheses are matched by the with-statement and not by the underlying `test`, that's also fine since they were organizational this doesn't make the `test` invalid.

Pablo has a working patch for this, we intend to fix this wart for Python 3.8.
历史
日期 用户 动作 参数
2018-09-28 13:50:45lukasz.langa修改recipients: + lukasz.langa, barry, georg.brandl, ishimoto, ncoghlan, benjamin.peterson, ezio.melotti, eric.araujo, steven.daprano, r.david.murray, Julian, serhiy.storchaka, ulope
2018-09-28 13:50:45lukasz.langa修改messageid: <1538142645.37.0.545547206417.issue12782@psf.upfronthosting.co.za>
2018-09-28 13:50:45lukasz.langa链接issue12782 messages
2018-09-28 13:50:45lukasz.langa创建