On Tue, 15 Mar 2011 11:17:18 -0400 Nick Coghlan <ncoghlan at gmail.com> wrote: > On Tue, Mar 15, 2011 at 10:22 AM, Michael Foord > <fuzzyman at voidspace.org.uk> wrote: > > On 15/03/2011 07:59, Nick Coghlan wrote: > >> While I actually think the current API design is a decent compromise, > >> another option to consider would be to move the underscore to the > >> *end* (as_dict_, replace_, make_) as is sometimes done for code that > >> needs to avoid conflicting with a keyword. > >> > >> Namespace collisions with actual fields would remain unlikely, while > >> pydoc would pick up the new names correctly. > >> > > > > Although it's a backwards incompatible change. Teaching pydoc to recognise > > the private methods isn't. > > If we can find a good way to do it, making pydoc smarter would > definitely be a nicer option. Wouldn't a decorator be adequate? @pydoc.public_api def _asdict(self): """some docstring""" ... Regards Antoine.
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