What is "self"?

Peter peter at commonlawgov.org
Fri Sep 23 11:42:06 EDT 2005


Terry Hancock wrote:

>On Friday 23 September 2005 07:11 am, Rick Wotnaz wrote:
>  
>
>>I've long thought that Guido missed an opportunity by not choosing 
>>to use 'i' as the instance identifier, and making it a reserved 
>>word. For one thing, it would resonate with the personal pronoun 
>>'I', and so carry essentially the same meaning as 'self'.
>>
Not realy.

>> It could 
>>also be understood as an initialism for 'instance'.
>>
MUCH better then trying to make it refer to "i" as in "me", but still.

>>And, because it 
>>is shorter, the number of objections to its existence *might* have 
>>been smaller than seems to be the case with 'self' as the 
>>convention.
>>    
>>
Humm... maybe. But would reap the fact that i does not have the same 
exact meaning of self.
With the word self, it is possable to change a feature of yourSELF, but 
try saying you changed a feature of "yourI", some internal logic in the 
programmers brain is going to go off, and if the programmer is tired and 
trying to finish something up but has that kind of internal confusion, 
as suttle as it may be, he will get burnt out and have to wait intill 
the next day.

>>And as a side benefit, it would make it impossible to use as a loop 
>>index a language feature that would be a huge selling point among a 
>>lot of experienced programmers. 
>>    
>>
>
>  
>
You think thats a good thing? o.0.
I agree that sometimes you need to name your loop variables well, but 
sometimes you only need a simple, temp loop variable.

I would expect such an aprouch to be more likely to be found in intercal 
(http://www.catb.org/~esr/intercal/), rather then in Python.

>How exactly is that?  Anybody who uses "i" as a variable name for
>anything other than an innermost loop index is a sick and twisted
>code sadist.
>
>  
>
Agreed, though to say "code sadist" is a little hard don't ya think? ;)

>You'd prefer what? "count" or "kount" or "i_am_an_innermost_loop_index_counter".
>I mean "explicit is better than implicit", right?
>  
>
>Maybe Fortran warped my brain, but I just don't see the benefit here.
>
Me ither.

I am no english professor, but isn't the word "i" usualy pointed at 
something you will, have, can, or can't do in english?
"me" or "self" or "this" or "my" or "cls" or "inst" are refering to just 
the object, nothing more, nothing less (except for "my" which is like 
referring to "something i own") and are much more human-comprehendable. 
IMHO.

>--
>Terry Hancock ( hancock at anansispaceworks.com )
>Anansi Spaceworks  http://www.anansispaceworks.com
>
>  
>

Peter



More information about the Python-list mailing list