• Nick Coghlan's avatar
    contextlib doc updates and refactoring · f7f5b855
    Nick Coghlan authored
    - explain single use, reusable and reentrant in docs
    - converted suppress to a reentrant class based impl
    - converted redirect_stdout to a reusable impl
    - moved both suppress and redirect_stdout behind a functional
      facade
    - added reentrancy tests for the updated suppress
    - added reusability tests for the updated redirect_stdio
    - slightly cleaned up an exception from contextmanager
    f7f5b855
contextlib.py 11.3 KB