7

如何将withPython 中的长子句分散到多行?现在,我有

    with self.context_manager_one(some, parameters, that, are, passed) \
            as return_value_one, \
            self.context_manager_two(self.p, slice(None), None) \
            as return_value_two:

我想遵循谷歌的 Python 风格指南,它禁止反斜杠继续。

4

1 回答 1

0

这已在 Python 3.10 中修复!

https://github.com/we-like-parsers/pegen/issues/229

https://bugs.python.org/issue12782

于 2020-06-11T12:12:37.423 回答