to thine own SELF be true...
Paul Watson
pwatson at redlinepy.com
Fri May 5 16:39:05 EDT 2006
Michael Ekstrand wrote:
> On Fri, May 05, 2006 at 05:08:24PM +0000, Mark Harrison wrote:
>
>>Is there a way to get rid of those the "self." references, or is this
>>just something I need to get my brain to accept?
>
>
> It's pretty much just something you'll need to get your brain to accept.
> You can replace self with something shorter, like s, but that's sure to
> cause mass confusion for other people who try to read your code.
>
> I, however, find that the self. references are a great benefit to
> readability, as it makes the scope of a variable quite easy to tell. A
> lot of my C++ code is littered with `this->' or similar
> explicit-scope-description things...
>
> - Michael
This fits perfectly with "Explicit is better than implicit."
More information about the Python-list
mailing list