total idiot question: +=, .=, etc...

Reimer Behrends behrends at
Thu Jun 24 01:28:40 EDT 1999

Zigron (zigron at wrote:
> Reimer Behrends <behrends at> wrote in message
> news:slrn7n0rr2.2fi.behrends at
> > Among all the suggestions for Python 2.0, removing the necessity of
> > prefixing methods and instance variables with "self." (and not having
> > to list it as an argument, either) would be my #1 wish.
>     Whyfor? I personally like the seperate scopes, beween the class
> and the method. It makes it so I don't have to clean up as much. I can
> use as many temporary variables as I want in a method, and as soon
> as that method is gone...... its gone.

I said nothing like that. I am simply saying that the syntax is a
major pain. To remind you, pretty much every single OO language other
than Python does not require you to add a self; yet at the same time
they have per-method and per-object data. It's a matter of how you
declare it.

>     The self.attribute thing makes sense. Each object has its own scope,
> er, namespace, whatever. Methods are considered objects, as are
> classes. Removing the 'self' requirement would, to me, change that.
> Methods wouldn't be objects anymore. :) At least it seems so to me,

I'm sorry, but I cannot make much sense of what you try to say here.
Could you perhaps elaborate?


				Reimer Behrends

More information about the Python-list mailing list