I believe you may be overreacting - I don't consider the current behaviour buggy and the module level API can be added later.My preference is to remove the method entirely and then implement the approach in PEP 343 by adding a module level "localcontext()" function in Py2.6. If you keep the method, then at least: * fix the docstring (and make it doctestable) * rename the method to .localcontext() * move the .copy() step to inside the contextmanager instead of its caller * update the WhatsNew example to match * add a unittest Either way, be sure to also update the docs. They currently reflect the __context__ approach. Raymond |
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com