From 24b9e1a00df8879c498b97129ce7918f27b717c3 Mon Sep 17 00:00:00 2001 From: Tommy Beadle Date: Thu, 2 Jun 2016 19:26:51 -0400 Subject: [Issue 15476] Make "code object" its own entry in the index --- Doc/c-api/code.rst | 6 ++---- Doc/library/marshal.rst | 3 ++- Doc/library/stdtypes.rst | 4 ++-- Doc/reference/datamodel.rst | 6 ++---- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst index 0412138..946ad6e 100644 --- a/Doc/c-api/code.rst +++ b/Doc/c-api/code.rst @@ -2,15 +2,13 @@ .. _codeobjects: +.. index:: object; code, code object + Code Objects ------------ .. sectionauthor:: Jeffrey Yasskin - -.. index:: - object: code - Code objects are a low-level detail of the CPython implementation. Each one represents a chunk of executable code that hasn't yet been bound into a function. diff --git a/Doc/library/marshal.rst b/Doc/library/marshal.rst index 0698834..1ce7326 100644 --- a/Doc/library/marshal.rst +++ b/Doc/library/marshal.rst @@ -17,7 +17,6 @@ rarely does). [#]_ .. index:: module: pickle module: shelve - object: code This is not a general "persistence" module. For general persistence and transfer of Python objects through RPC calls, see the modules :mod:`pickle` and @@ -35,6 +34,8 @@ supports a substantially wider range of objects than marshal. maliciously constructed data. Never unmarshal data received from an untrusted or unauthenticated source. +.. index:: object; code, code object + Not all Python object types are supported; in general, only objects whose value is independent from a particular invocation of Python can be written and read by this module. The following types are supported: booleans, integers, long diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 2daaf27..5d8ebbc 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -2953,13 +2953,13 @@ need to explicitly set it on the underlying function object:: See :ref:`types` for more information. +.. index:: object; code, code object + .. _bltin-code-objects: Code Objects ------------ -.. index:: object: code - .. index:: builtin: compile single: func_code (function object attribute) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index eca4484..fe0cea8 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -909,11 +909,9 @@ Internal types definitions may change with future versions of the interpreter, but they are mentioned here for completeness. - Code objects - .. index:: - single: bytecode - object: code + .. index:: bytecode, object; code, code object + Code objects Code objects represent *byte-compiled* executable Python code, or :term:`bytecode`. The difference between a code object and a function object is that the function object contains an explicit reference to the function's globals (the module in -- cgit v0.12