Finding Python help...

Bengt Richter bokr at oz.net
Mon Mar 31 23:07:06 EST 2003


On Mon, 31 Mar 2003 22:14:07 +1000, Steve Cassidy <steve.cassidy at mq.edu.au> 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...
>
>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
>     help(print)
>              ^
>SyntaxError: invalid syntax
>
>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?
>
if help(xxx) does that, help('xxx') will often be useful. E.g., help('print').

>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 docs.
help(list)

>
>In general, pydoc is great but I guess this inconsistency bugs me.
>
What platform/version are you using?
(Above comments apply to 2.2.2 on windows, at least).

Regards,
Bengt Richter




More information about the Python-list mailing list