Nick Coghlan <> added the comment:

Right, the merged PR adds a simpler example that handles "ignore exceptions or 
not" by selecting between suppress() and nullcontext().

The documentation still needs updating to improve or remove the file-based 
example, and point out that for resources that get acquired on construction, 
you either need to delay construction to the start of the with statement, or 
else use ExitStack instead of nullcontext.


Python tracker <>
Python-bugs-list mailing list

Reply via email to