[Python-Dev] pydoc for named tuples is missing methods
Tim Lesher
tlesher at gmail.com
Mon Mar 14 13:28:11 CET 2011
More information about the Python-Dev mailing list
Mon Mar 14 13:28:11 CET 2011
- Previous message: [Python-Dev] pydoc for named tuples is missing methods
- Next message: [Python-Dev] pydoc for named tuples is missing methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Mar 14, 2011 at 05:45, Nick Coghlan <ncoghlan at gmail.com> wrote: > There are two relatively simple ways forward I can see: > > A. Add a __public__ attribute that pydoc (and import *) understand. > This would overrride the default "this is private" detection and add > affected names to the public list (without needing to respecify all > the "default public" names - this is important in order to support > subclassing correctly) I believe this was the direction the bug report was implying. I'll be sprinting for a few hours this morning; if there are no objections, I will try to turn this idea into a patch that makes pydoc.visiblename look for a __public__ function attribute as "step 0". Maybe there should also be a @public decorator to apply it, although that name may be an attractive nuisance, tempting C++ or Java programmers new to Python to ask for @protected and @private... -- Tim Lesher <tlesher at gmail.com>
- Previous message: [Python-Dev] pydoc for named tuples is missing methods
- Next message: [Python-Dev] pydoc for named tuples is missing methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list