Self Nanny

Emile van Sebille emile at fenx.com
Mon Mar 6 20:30:29 EST 2000


Wouldn't this be a great excuse to explore your innerself? ;-)

Emile van Sebille
emile at fenx.com
-------------------


----- Original Message -----
From: bjorn <bjorn at roguewave.com>
To: Paul Prescod <paul at prescod.net>
Cc: <python-list at python.org>
Sent: Monday, March 06, 2000 12:20 PM
Subject: Re: Self Nanny


> Paul Prescod wrote:
>
> > I have never seen correct Python code where the first argument to a
> > method was not named "self". Therefore I think that the flexibility
of
> > allowing it to be named "spam" is more trouble than it is worth.
Python
> > should just require "self" be named "self".
>
> Until we get proper lexical scoping, in which case an explicit self
> argument is not only needed, but needs to have the opportunity to be
> different from the enclosing method's self:
>
>     class Outer:
>         def foo(self):
>             self.x = 1
>             class Inner:
>                 def bar(me):
>                     me.x = 2
>                     return me.x + self.x
>             return Inner
>
> of-course-we-could-always-use-the-Java-hack'ly y'rs
> -- bjorn
>
>
>
> --
> http://www.python.org/mailman/listinfo/python-list
>
>






More information about the Python-list mailing list