Python中的Multiline with子句

时间:2013-05-04 18:32:46

标签: python styles contextmanager

如何在多行中在Python中传播长with子句?现在,我有

    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:

我想关注Google's Python style guide,它禁止反斜杠续行。

1 个答案:

答案 0 :(得分:0)