the annoying, verbose self

braver deliverable at
Sat Nov 24 00:48:22 CET 2007

On Nov 24, 2:38 am, "BJörn Lindqvist" <bjou... at> wrote:

> The big deal is that "self." occupies important horizontal screen real
> estate. That is, it is usually not self in itself that is problematic,

Exactly.  I understand and appreciate all the scoping qualification
and explicit"ation" needs, but I still want my code to look good and
uncluttered after all is said and done.  Using indentation saves us
from all those end's or {}, no less annoying than self, -- then the
self comes along and defeats the purpose of conciseness.

> but the overflowing lines is. Take this silly vector class for
> > suppose that the syntax were
> > expanded so that, in a method, a dot
> > ".", as a precursor to an identifier,
> > was treated as "self." is currently treated?
> I like that a lot. This saves 12 characters for the original example
> and removes the need to wrap it.
> 7            return math.sqrt(.x * .x + .y * .y + .z * .z)
> +1 Readability counts, even on small screens.

Hear, hear!  Dear G-ds of Python, pls give us a --dotself option!


More information about the Python-list mailing list