Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find information about a function in python?

Tags:

python

I know in R you can just type ?"function_name". How do you do this in python? Specifically, I am trying to find information about set_position in the pyplot library.

like image 824
lord12 Avatar asked Feb 22 '13 17:02

lord12


1 Answers

help(function)

should do the trick.

Demo:

def func():
    """
    I am a function who doesn't do anything,
    I just sit in your namespace and crowd it up.
    If you call me expecting anything
    I'll just return to you the singleton None
    """
    pass

help(func)
like image 119
mgilson Avatar answered Sep 17 '22 23:09

mgilson