Why self?
Terry Reedy
tjreedy at udel.edu
Mon Jul 8 18:18:08 EDT 2002
"Robb Shecter" <rs at onsitetech.com> wrote in message
news:3D29CE9D.4000802 at onsitetech.com...
> Matt Gerrans wrote:
> I completely agree, but I think the situation's even worse than you
> described: A'typical' case of standard OO programming is made the
most
> tedious to write: References to instance variables from methods:
>
> self.__velocity = self.__factor1 * self.__factor2
>
> etc. I find this totally unreadable (7 extra characters per
referenced
> instance variable).
Only 2 'extra' chars are needed -- a letter and '.'. Why the extra
'__'?
TJR
More information about the Python-list
mailing list