Explicit Frustration of the Self
johnroth at ameritech.net
Thu Jan 2 00:32:25 CET 2003
"Erik Max Francis" <max at alcyone.com> wrote in message
news:3E1266A4.D6D3AF6F at alcyone.com...
> Bengt Richter wrote:
> > Someone proposed just a bare leading dot or invisible self name.
> > class Foo:
> > bar = 123
> > def baz(,arg):
> > .arg = arg
> > return .bar+arg
> > It's less typing anyway. That's a plus for me.
> Yeah, the prefixed dot has been suggested before. I'm for the status
> quo on this issue myself, but of the suggestions, at least this one
> seems to be the one thought all the way through.
> The basic, "I don't like having to keep writing self, why not just
> it implicit" doesn't get very far in the face of bound vs. unbound
> methods, etc.
Could you say a bit more about the issues? I don't see the
problem with bound versus unbound - the differences come in
the method invocation (which wouldnn't change) rather than the
It's the "etc." I'm interested in. For example, the current
situation essentially splits the lookup tree just above the local
symbols, which is very efficient for a dynamic language like
Python. Making 'self.' implicit would require the lookup in all cases,
including the very common cases of module imports and built-in
That said, I'd love to get rid of the excess baggage, but I don't
see how it would work efficiently.
> Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
> __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
> / \ Did you ever love somebody / Did you ever really care
> \__/ Cassandra Wilson
> The laws list / http://www.alcyone.com/max/physics/laws/
> Laws, rules, principles, effects, paradoxes, etc. in physics.
More information about the Python-list