mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-05 12:00:16 +00:00
14 lines
439 B
Plaintext
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?
|