why does "help(import)" not work?

Sion Arrowsmith sion at viridian.paintbox
Fri Nov 6 05:51:46 EST 2009


Robert P. J. Day <rpjday at crashcourse.ca> wrote:
>On Fri, 6 Nov 2009, Brian Quinlan wrote:
>> The correct syntax is:
>> help('import')
>
>  ah, ok, now it makes sense.  so python3 just lets me be sloppy about
>it, as in:
>
>  >>> help(print)

No, "print" is a function in python3, not a statement as it is in
earlier versions. There's nothing sloppy about it, and nothing in
help has changed from 2 to 3: if it's a language keyword, you need
to pass help it's name; if it's a function or a class, you can pass
help the object itself.

-- 
\S

   under construction




More information about the Python-list mailing list