Finding Python help...
neal at metaslash.com
Mon Mar 31 14:31:43 CEST 2003
On Mon, 31 Mar 2003 07:14:07 -0500, Steve Cassidy wrote:
> One problem I'm having learning (and teaching) Python is finding help on
> some parts of the language. I'm wondering if I'm just looking the
> wrong way...
After you learn, it would be great to get patches to correct
your perceived problems.
> Eg. I wanted to find out how to get print to leave off the trailing
> newline. help(print) doesn't tell me:
> >>> help(print)
> File "<stdin>", line 1
> SyntaxError: invalid syntax
# now you are in pydoc and can enter keywords such as print, etc.
> of course, print is a keyword and not a function (which by the way I
> find odd but there you are...). I found the answer eventually in the
> language definition manual but it wasn't obvious. Where should I look?
Where did you expect it to be? Can you recommend specific changes?
> Another problem, how do I find out what methods are defined on a type
> like list? Again, I end up in the tutorial trying to find relevant
Don't forget about docstrings too:
>>> print .__doc__
list() -> new list
list(sequence) -> new list initialized from sequence's items
>>> print .append.__doc__
L.append(object) -- append object to end
More information about the Python-list