12.07.2015 Views

Is Python a

Is Python a

Is Python a

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FILE(built-in)DESCRIPTIONThis module provides access to some objects usedor maintained by the interpreter and to functions...more omitted...FUNCTIONS_ _displayhook_ _ = displayhook(...)displayhook(object) -> NonePrint an object to sys.stdout and also save it...more omitted...DATA_ _name_ _ = 'sys'_ _stderr_ _ = ...more omitted...Some of the information in this report is docstrings, and some of it (e.g., function callpatterns) is structural information that PyDoc gleans automatically by inspectingobjects’ internals. You can also use help on built-in functions, methods, and types.To get help for a built-in type, use the type name (e.g., dict for dictionary, str forstring, list for list). You’ll get a large display that describes all the methods availablefor that type:>>> help(dict)Help on class dict in module _ _builtin_ _:class dict(object)| dict( ) -> new empty dictionary....more omitted...>>> help(str.replace)Help on method_descriptor:replace(...)S.replace (old, new[, maxsplit]) -> stringReturn a copy of string S with all occurrences...more omitted...>>> help(ord)Help on built-in function ord:ord(...)ord(c) -> integerReturn the integer ordinal of a one-character string.Finally, the help function works just as well on your modules as built-ins. Here it isreporting on the docstrings.py file coded earlier; again, some of this is docstrings, andsome is information automatically extracted by inspecting objects’ structures:284 | Chapter 14: The Documentation Interlude

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!