]> granicus.if.org Git - python/commit
contextlib doc updates and refactoring
authorNick Coghlan <ncoghlan@gmail.com>
Sat, 19 Oct 2013 14:30:51 +0000 (00:30 +1000)
committerNick Coghlan <ncoghlan@gmail.com>
Sat, 19 Oct 2013 14:30:51 +0000 (00:30 +1000)
commit8608d26e815a63f5a35524abea40ad80a5e93bb2
tree1f7d7ccd3b19dd867ab67f7f37b7342092c0ed3f
parente723622775172a2516f43721d998aae95f32e59d
contextlib doc updates and refactoring

- 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
Doc/library/contextlib.rst
Lib/contextlib.py
Lib/test/test_contextlib.py
Misc/NEWS