File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -505,6 +505,7 @@ \subsubsection{Functions.}
505505\var {m} is the module in which the function \var {f} was defined).
506506
507507\subsubsection {Methods. }
508+ \obindex {method}
508509
509510Methods are functions that are called using the attribute notation.
510511There are two flavors: built-in methods (such as \code {append()} on
@@ -521,6 +522,27 @@ \subsubsection{Methods.}
521522
522523(See the Python Reference Manual for more info.)
523524
525+ \subsubsection {Code Objects. }
526+ \obindex {code}
527+
528+ Code objects are used by the implementation to represent
529+ `` pseudo-compiled'' executable Python code such as a function body.
530+ They differ from function objects because they don't contain a
531+ reference to their global execution environment. Code objects are
532+ returned by the built-in \code {compile()} function and can be
533+ extracted from function objects through their \code {func_code}
534+ attribute.
535+ \bifuncindex {compile}
536+ \ttindex {func_code}
537+
538+ A code object can be executed or evaluated by passing it (instead of a
539+ source string) to the \code {exec} statement or the built-in
540+ \code {eval()} function.
541+ \stindex {exec}
542+ \bifuncindex {eval}
543+
544+ (See the Python Reference Manual for more info.)
545+
524546\subsubsection {Type Objects. }
525547
526548Type objects represent the various object types. An object's type is
Original file line number Diff line number Diff line change @@ -505,6 +505,7 @@ \subsubsection{Functions.}
505505\var {m} is the module in which the function \var {f} was defined).
506506
507507\subsubsection {Methods. }
508+ \obindex {method}
508509
509510Methods are functions that are called using the attribute notation.
510511There are two flavors: built-in methods (such as \code {append()} on
@@ -521,6 +522,27 @@ \subsubsection{Methods.}
521522
522523(See the Python Reference Manual for more info.)
523524
525+ \subsubsection {Code Objects. }
526+ \obindex {code}
527+
528+ Code objects are used by the implementation to represent
529+ `` pseudo-compiled'' executable Python code such as a function body.
530+ They differ from function objects because they don't contain a
531+ reference to their global execution environment. Code objects are
532+ returned by the built-in \code {compile()} function and can be
533+ extracted from function objects through their \code {func_code}
534+ attribute.
535+ \bifuncindex {compile}
536+ \ttindex {func_code}
537+
538+ A code object can be executed or evaluated by passing it (instead of a
539+ source string) to the \code {exec} statement or the built-in
540+ \code {eval()} function.
541+ \stindex {exec}
542+ \bifuncindex {eval}
543+
544+ (See the Python Reference Manual for more info.)
545+
524546\subsubsection {Type Objects. }
525547
526548Type objects represent the various object types. An object's type is
You can’t perform that action at this time.
0 commit comments