On Mon, Mar 14, 2011 at 12:41 PM, Tim Lesher <tlesher at gmail.com> wrote: > [I mentioned this to Raymond Hettinger after his PyCon talk, and I > promised a bug and hopefully a patch. I don't see an obvious solution, > though, so I'll ask here first.] > > Because named tuple prefixes a single underscore to its added method > names (_asdict, _replace, and _make), those methods' docstrings are > omitted from pydoc: > >>>> Point=collections.namedtuple('Point', 'x y') >>>> help(Point) > Help on class Point in module __main__: > [output omitted; it excludes _asdict, _replace, and _make] > > pydoc's rules for name inclusion are in pydoc.visiblename(): > > * If the name is in the hidden list, omit it > * If the name looks like a __special_method__, include it > * If the there is an "all" specified, then include it if it appears in all > * Otherwise, include it if it doesn't begin with an underscore > > There doesn't seem to be an obvious way to get around these rules for > named tuples... am I overlooking something? Works for me. Python 3.2 on 32bit Linux. cheers James -- -- James Mills -- -- "Problems are solved by method"
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