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>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4