Attack a sacred Python Cow
code at pizzashack.org
Sun Jul 27 21:03:40 CEST 2008
On Sat, Jul 26, 2008 at 12:06:05AM -0400, Terry Reedy wrote:
> There is no requirement to have 'self' in the parameter list.
But there is a requirement to have *something* which refers to the
object instance. Why can't this be implicit with a keyword defined in
python to refer to it?
> So the proposal would have to be that the compiler scan the function
> body and decide which dotted name prefix is the one to be implicitly
> added. Have fun writing the discovery algorithm.
That's crazy talk.
> Or the proposal would have to be that 'self' is mandatory for all
> programmers in all languages. I think *that* would be pernicious.
> People are now free to write the more compact 's.sum = s.a + s.b + s.c'
s = self
There, your problem is fixed. Besides, in general, it's better
programming practie to use meaningful names, with fairly obvious and
Derek D. Martin
GPG Key ID: 0x81CFE75D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
More information about the Python-list