[Python-Dev] pydoc for named tuples is missing methods

Nick Coghlan ncoghlan at gmail.com
Mon Mar 14 12:18:20 CET 2011


On Mon, Mar 14, 2011 at 6:43 AM, Éric Araujo <merwok at netwok.org> wrote:
>> No, probably we should add some sort of __yes_i_am_public__ override
>> attribute that pydoc looks for. It's such a pity that those methods
>> have to have underscores...
>
> My opinion is that pydoc should use __dir__ (namedtuple does not
> currently use it but could).

Oh, I forgot about __dir__. However, the problem with that is that
dir() and __dir__() are designed to return *everything*, public or
private.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list