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

R. David Murray rdmurray at bitdance.com
Tue Mar 15 00:48:54 CET 2011


On Tue, 15 Mar 2011 09:54:23 +1300, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Nick Coghlan wrote:
> 
> > True, but all those underscores are a PITA to type and read for
> > methods that are meant to be called directly.
> 
> Matter of taste, I suppose. I don't find them all that
> bothersome, and a double underscore name stands out very
> clearly as being part of the infrastructure rather than
> something user-defined.

But directly calling a __xxx__ method in Python is a very
unusual thing to do.  It would be extremely odd to have that
be the expected way to call a method on a class.

--
R. David Murray                                      www.bitdance.com


More information about the Python-Dev mailing list