File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -556,13 +556,17 @@ msgid ""
556556"input (such as opening a user specified collection of files), or from some "
557557"of the context managers being optional::"
558558msgstr ""
559+ ":class:`ExitStack` 的主要应用场景已在该类的文档中给出:在单个 :keyword:`with` "
560+ "语句中支持可变数量的上下文管理器和其他清理操作。 "
561+ "这个可变性可以来自通过用户输入驱动所需的上下文管理器数量(例如打开用户所指定的文件集),或者来自将某些上下文管理器作为可选项。"
559562
560563#: ../../library/contextlib.rst:522
561564msgid ""
562565"As shown, :class:`ExitStack` also makes it quite easy to use :keyword:`with`"
563566" statements to manage arbitrary resources that don't natively support the "
564567"context management protocol."
565568msgstr ""
569+ "如上所示,:class:`ExitStack` 还让使用 :keyword:`with` 语句来管理任意非原生支持上下文管理器协议的资源变得相当容易。"
566570
567571#: ../../library/contextlib.rst:528
568572msgid "Catching exceptions from ``__enter__`` methods"
You can’t perform that action at this time.
0 commit comments