On Fri, May 24, 2013 at 10:31 AM, PJ Eby <p...@telecommunity.com> wrote: > On Thu, May 23, 2013 at 6:58 PM, Ben Hoyt <benh...@gmail.com> wrote: >> It seems no one has provided >> decent use-case examples (apart from contrived ones) > > Um, copy.copy(), pprint.pprint(), a bunch of functions in pkgutil > which are actually *based on this implementation already* and have > been since Python 2.5... I don't see how any of those are contrived > examples. If we'd had this in already, all the registration-based > functions for copying, pickling, etc. would likely have been > implemented this way, and the motivating example for the PEP is the > coming refactoring of pprint.pprint.
We should be able to use it to help deal with the "every growing importer API" problem, too. I know that's technically what pkgutil already uses it for, but elevating this from "pkgutil implementation detail" to "official stdlib functionality" should make it easier to document properly :) Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ 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