[Tutor] python 3.4 documentation

Alex Kleider akleider at sonic.net
Tue Jun 16 04:59:05 CEST 2015


On 2015-06-14 20:49, Steven D'Aprano wrote:

> The Python interactive interpreter comes with a powerful interactive
> help system. At the Python prompt, you can enter:
> 
> help()
> 
> help("keyword")  # e.g. "raise"
> 
> help(any_object)
> 
> 
> to get help and documentation.


Thank you for this tip.  I sort of was aware of it but had no idea
of how much help was there.  I certainly had no idea that modules
were documented as well:

alex at t61p:~$ python3
Python 3.4.0 (default, Apr 11 2014, 13:05:18)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> help('key words')
no Python documentation found for 'key words'

>>> help('keywords')

Here is a list of the Python keywords.  Enter any keyword to get more 
help.

False               def                 if                  raise
None                del                 import              return
True                elif                in                  try
and                 else                is                  while
as                  except              lambda              with
assert              finally             nonlocal            yield
break               for                 not
class               from                or
continue            global              pass

>>> import csv
>>> help('csv')
...and documentation of the modules appears in the pager!


More information about the Tutor mailing list