2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-19 03:25:44 +00:00
cheat.sheets/sheets/_python/doc
2017-05-30 09:52:48 +00:00

14 lines
439 B
Plaintext

# Get the documentation string for an python object from shell
# we use itertools.starmap as an example
python -c 'import inspect; import itertools; print inspect.getdoc(itertools.starmap)'
# Get the documentation string for an object from python
# we use itertools.starmap as an example
print inspect.getdoc(itertools.starmap)
# In a interactive python shell
help(itertools.starmap)
# In a interactive IPython shell
itertools.starmap?