home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / python / pyhtmldoc / c / code_objec < prev    next >
Text File  |  1996-11-14  |  952b  |  19 lines

  1. <TITLE>Code Objects -- Python library reference</TITLE>
  2. Next: <A HREF="../t/type_objects" TYPE="Next">Type Objects</A>  
  3. Prev: <A HREF="../m/methods" TYPE="Prev">Methods</A>  
  4. Up: <A HREF="../o/other_built-in_types" TYPE="Up">Other Built-in Types</A>  
  5. Top: <A HREF="../t/top" TYPE="Top">Top</A>  
  6. <H3>2.1.7.5. Code Objects</H3>
  7. Code objects are used by the implementation to represent
  8. ``pseudo-compiled'' executable Python code such as a function body.
  9. They differ from function objects because they don't contain a
  10. reference to their global execution environment.  Code objects are
  11. returned by the built-in <CODE>compile()</CODE> function and can be
  12. extracted from function objects through their <CODE>func_code</CODE>
  13. attribute.
  14. A code object can be executed or evaluated by passing it (instead of a
  15. source string) to the <CODE>exec</CODE> statement or the built-in
  16. <CODE>eval()</CODE> function.
  17. (See the Python Reference Manual for more info.)
  18. <P>
  19.