newbie: self.member syntax seems /really/ annoying
BJörn Lindqvist
bjourne at gmail.com
Thu Sep 13 10:30:36 EDT 2007
On 9/12/07, Dave Hansen <iddw at hotmail.com> wrote:
> The name "self" is just a convention. You can give it any name you
> wish. Using "s" is common.
Not it's not common. And the name "self" is a convention codified in
PEP8 which you shouldn't violate.
And I agree with the OP that the convention is really annoying.
self.rect.width = self.foo(self.rect.x + self.rect.y) * self.boo()
is much less concise than
s.rect.width = s.foo(s.rect.x + s.rect.y) * s.boo()
--
mvh Björn
More information about the Python-list
mailing list