Method Underscores?

Josiah Carlson jcarlson at uci.edu
Thu Oct 21 13:42:26 EDT 2004


Nicolas Fleury <nid_oizo at yahoo.com_remove_the_> wrote:
> 
> Hans Nowak wrote:
> > I suppose it might be clearer if one could write
> > 
> > def +(self, other):
> >     ...
> 
> And a syntax would be needed to get that function, that's why I like so 
> much the Python approach.  My only complain is that _somename_ would 
> probably have been enough instead of __somename__.  In C++, all 
> _[A-Z_].* are reserved, reserve _.*_ would have been enough in Python IMHO.


I personally like the double leading and trailing underscores.  They
jump out more.  Regardless, it is a little late to complain; unless one
wants to change the behavior in Py3k, but I think that most of those who
have a say in Py3k's development believe the double underscores were a
good idea.

  Josiah




More information about the Python-list mailing list