History of 'self' and why not at least 'my'?

Duncan Booth duncan at NOSPAMrcp.co.uk
Fri Jan 11 09:15:46 EST 2002

"Steve Holden" <sholden at holdenweb.com> wrote in
news:bbC%7.14984$2V4.1153825 at atlpnn01.usenetserver.com: 

>> If this is what you are trying to do, then Python already has a
>> statement to handle this, namely 'assignment':
>>         w = obj[expression].field[exp].etc
>>         w.a = 5
>>         w.b = 6
>> The same technique can be used at a local level to reduce the
>> overhead of typing self:
>>     s = self
>>     s.a, s.b, s.c = 1, 2, 3
> I've added the first point to FAQ 6.31, but not the second. 

That's alright, the second point wasn't entirely serious.
Thanks for updating the FAQ.

Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?

More information about the Python-list mailing list