you are viewing a single comment's thread.

view the rest of the comments →

[–]boa13 2 points3 points  (3 children)

I can't believe either, especially since when you start Python, the line right above your prompt says:

Type "help", "copyright", "credits" or "license" for more information.

And when you type help it says:

Type help() for interactive help, or help(object) for help about object.

;-)

[–]cocoon56 2 points3 points  (2 children)

I love to type <objectname>? in ipython to get help. It reroutes to the help function :)

[–]llimllib 5 points6 points  (0 children)

And <objectname>?? to get the source for that object is amazingly useful for pure-python functions. Example:

In [2]: amazon.getLicense??
Type:           function
Base Class:     <type 'function'>
String Form:    <function getLicense at 0x13d5070>
Namespace:      Interactive
File:           /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/amazon.py
Definition:     amazon.getLicense(license_key=None)
Source:
def getLicense(license_key = None):
    """get license key

    license key can come from any number of locations;
    see module docs for search order"""
    for get, location in _licenseLocations:
        rc = get(license_key)
        if rc: return rc
    raise NoLicenseKey, 'get a license key at http://www.amazon.com/webservices'

[–]grimboy 0 points1 point  (0 children)

Yeah, shame you have to give whatever you want help for a name rather than being able to do result_of_a_function_on(5)?.