Nov. 19, 2019
5:12 p.m.
@jayvdb on GitHub and I are working on a new version of one of my packages, stdio-mgr (https://github.com/bskinn/stdio-mgr), with a dramatically expanded API and capabilities. Context managers feature heavily in the planned design; part of the design plan is to allow instantiation of a StdioManager object prior to entering a context, so that the user can tweak settings on the resulting object beforehand:
cm = StdioManager() cm.setting = True cm.other_setting = False with cm: {do stuff with stdio managed}
If this paradigm holds, we will *specifically* be exploiting the distinction between __init__ and __enter__. -42 to abolishing __enter__.