[issue10049] Add the null context manager to contextlib

2010-10-08 Thread Hrvoje Nikšić
Changes by Hrvoje Nikšić : -- components: +Library (Lib) type: -> feature request ___ Python tracker ___ ___ Python-bugs-list mailing

[issue10049] Add the null context manager to contextlib

2010-10-08 Thread Hrvoje Nikšić
New submission from Hrvoje Nikšić : I find that I frequently need the "null" (no-op) context manager. For example, in code such as: with transaction or contextlib.null(): ... Since there is no easy expression to create a null context manager, we must resort to workarounds, such as: if t