Nick Coghlan wrote: > Raymond Hettinger wrote: > >> The right way to do it was presented in PEP343. The implementation >> was correct and the API was simple. > > > Raymond's persuaded me that he's right on the API part at the very > least. The current API was a mechanical replacement of the initial > __context__ based API with a normal method, whereas I should have > reverted back to the module-level localcontext() function from PEP343 > and thrown the method on Context objects away entirely. > > I can fix it on the trunk (and add those missing tests!), but I'll > need Anthony and/or Neal's permission to backport it and remove the > get_manager() method from Python 2.5 before we get stuck with it forever. > Please go ahead and get the patch together for localcontext(). This should be an easy sell:
* simple bugs can be fixed in Py2.5.1 but API mistakes are forever. * currently, all of the docs, docstrings, and whatsnew are incorrect. * the solution has already been worked-out in PEP343 -- it's nothing new. * nothing else, anywhere depends on this code -- it is as safe a change as we could hope for. Neal is tough, but he's not heartless ;-) 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