Do I always have to write "self." ?

Louis M. Pecora pecora at anvil.nrl.navy.mil
Sun Apr 30 09:55:47 EDT 2000


[[ This message was both posted and mailed: see
   the "To," "Cc," and "Newsgroups" headers for details. ]]

In article <Ftq7Fo.z7 at world.std.com>, Will Ware <wware at world.std.com>
wrote:

> Louis M. Pecora (pecora at anvil.nrl.navy.mil) wrote:
> > I'm sure some way of declaring variables 'local' could be done in the
> > class defintion, but I doubt Guido would do that now.
> 
> It wouldn't be too hard to write a preprocessor that would do this
> for you. You might put tags in your code such as
> #Locals: foo bar xyzzy
> and
> #Endlocals

[cut]

> The choice to use the word 'self' is not imposed by Python, it's just
> a convention for readability. You can use 's' instead if you wish.

[cut]

Thanks for both ideas and pointers.  Writing a preprocessor is out of
the question for me.  I doubt I'm that good or even have the time.  I
like the second suggestion.  Thanks, again.



More information about the Python-list mailing list