Magic words
Philip Swartzleonard
starx at pacbell.net
Fri Apr 12 06:05:35 EDT 2002
Seo Sanghyeon || Fri 12 Apr 2002 02:47:52a:
> Hello. I am new to Python. I have a question. I got confused
> by all those 'magic words' -- __init__, __class__, __doc__,
> __name__ and so on. Where can I find a documentation about
> these words? Or is there a list of 'magic words'?
>
> Happy Python!
> Seo Sanghyeon
The first section of the index[1] for the language reference manual lists
all of these things (the underscore section), with links. You can often
find the relevant names for an object if you can find the right
description of the object in the reference, e.g., [2] points near moudle,
class, and instance information. Be warned, the language refernece can
read like a brick if you aren't used to it, and it's easy to get confused.
The library reference[3] has some useful information near the beginning,
in section 2. For exapmle, section 2.2.9.3 [4] gives all the names you
need to do evil things to function objects.
If anyone has a better rundown... =)
Have fun.
[1]http://www.python.org/doc/current/ref/genindex.html
[2]http://www.python.org/doc/current/ref/types.html#l2h-74
[3]http://www.python.org/doc/current/lib/lib.html
[4]http://www.python.org/doc/current/lib/typesfunctions.html
--
Philip Sw "Starweaver" [rasx] :: www.rubydragon.com
More information about the Python-list
mailing list