@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__.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/5SSNU6OSIWJE32EP6WK25AG4MJYVC6FE/
Code of Conduct: http://python.org/psf/codeofconduct/