1 Sep 2007 01:14
Re: Starting classes
Alan Gauld <alan.gauld <at> btinternet.com>
2007-08-31 23:14:48 GMT
2007-08-31 23:14:48 GMT
<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 _______________________________________________ Tutor maillist - Tutor <at> python.org http://mail.python.org/mailman/listinfo/tutor
> PYTHONPATH:
> E:\Python25\;E:\PythonWork\;E:\Programs\Ulipad3.7\
>
> And another question is, exactly what should go into PYTHONPATH?
> I've
> never been clear about that.
Its what goes into sys.path.
In other words its where your local modules are stored. Using an
environment variable rather than a path file, as is often suggested,
allows each user to have their own module library, and even
multiple libraries by using a script to launch Python that redefines
PYTHONPATH before starting Python. Or you can do it manually.
Much more flexible. I'm a big fan of environment variables!
Alan G
_______________________________________________
Tutor maillist - Tutor <at> python.org
RSS Feed