Erik Bray wrote:
My question would be to
make that a language-level requirement of the context manager
protocol, or just something CPython does...

I think it should be a language-level requirement, otherwise
it's not much use.

Note that it's different from some existing CPython-only
behaviour such as refcounting, because it's possible to
code around those things on other implementations that
don't provide the same guarantees, but here there's *no*
way to code around it.

At the very least, it should be a documented guarantee
in CPython, not just something left "up to the
implementation".

--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to