[Tutor] Starting classes

Alan Gauld alan.gauld at btinternet.com
Sat Sep 1 01:14:48 CEST 2007


<christopher.henk at allisontransmission.com> wrote

> def look(here):
>        "Look around the place you are in"
>        print here.description
>
> Not sure if this works as is, I believe it depends on the 
> interpreter, but
> it is customary to use the word self as the first parameter,

It is just a custom and 'here' is as good a name as any
since its refering to the place object - ie here...

But self is more conventional and using here might confuse
some readers. The interpreters should all be happy enough
with either name.

Alan G 




More information about the Tutor mailing list