@@ -730,8 +730,8 @@ \section{The standard type hierarchy\label{types}}
730730variables (starting with the argument names); \member {co_cellvars} is
731731a tuple containing the names of local variables that are referenced by
732732nested functions; \member {co_freevars} is a tuple containing the names
733- of local variables that are neither local nor global ; \member {co_code}
734- is a string representing the sequence of bytecode instructions;
733+ of free variables; \member {co_code} is a string representing the
734+ sequence of bytecode instructions;
735735\member {co_consts} is a tuple containing the literals used by the
736736bytecode; \member {co_names} is a tuple containing the names used by
737737the bytecode; \member {co_filename} is the filename from which the code
@@ -742,10 +742,6 @@ \section{The standard type hierarchy\label{types}}
742742(including local variables); \member {co_flags} is an integer encoding
743743a number of flags for the interpreter.
744744
745- The \member {co_cellvars} and \member {co_freevars} are present in
746- Python 2.1 when nested scopes are not enabled, but the code itself
747- does not use or create cells.
748-
749745\withsubitem {(code object attribute)}{
750746 \ttindex {co_argcount}
751747 \ttindex {co_code}
@@ -766,10 +762,19 @@ \section{The standard type hierarchy\label{types}}
766762\code {0x04} is set if the function uses the \samp {*arguments} syntax
767763to accept an arbitrary number of positional arguments; bit
768764\code {0x08} is set if the function uses the \samp {**keywords} syntax
769- to accept arbitrary keyword arguments; other bits are used internally
770- or reserved for future use; bit \code {0x10} is set if the function was
771- compiled with nested scopes enabled. If\index {documentation string} a
772- code object represents a function, the first item in
765+ to accept arbitrary keyword arguments; bit \code {0x20} is set if the
766+ function is a \obindex {generator}.
767+
768+ Future feature declarations (\samp {from __future__ import division})
769+ also use bits in \member {co_flags} to indicate whether a code object
770+ was compiled with a particular feature enabled: bit \code {0x2000} is
771+ set if the function was compiled with future division enabled; bits
772+ \code {0x10} and \code {0x1000} were used in earlier versions of Python.
773+
774+ Other bits in \member {co_flags} are reserved for internal use.
775+
776+ If\index {documentation string} a code object represents a function,
777+ the first item in
773778\member {co_consts} is the documentation string of the function, or
774779\code {None} if undefined.
775780
0 commit comments