From d4a34e96ee276e8902b7c3e3d01c3372b13f5e8a Mon Sep 17 00:00:00 2001 From: Tommy Beadle Date: Thu, 2 Jun 2016 19:26:51 -0400 Subject: [PATCH] [Issue 15476] Make "code object" its own entry in the doc index. --- Doc/c-api/code.rst | 8 ++++---- Doc/library/marshal.rst | 5 ++++- Doc/library/stdtypes.rst | 6 ++++-- Doc/reference/datamodel.rst | 2 ++ 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst index 9c93563..f52d71a 100644 --- a/Doc/c-api/code.rst +++ b/Doc/c-api/code.rst @@ -2,15 +2,15 @@ .. _codeobjects: +.. index:: + object: code + single: 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 af43944..880694c 100644 --- a/Doc/library/marshal.rst +++ b/Doc/library/marshal.rst @@ -16,7 +16,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 @@ -34,6 +33,10 @@ supports a substantially wider range of objects than marshal. maliciously constructed data. Never unmarshal data received from an untrusted or unauthenticated source. +.. index:: + single: code object + object: code + 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, floating diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 33bd7a1..e9be804 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -4437,13 +4437,15 @@ attribute, you need to explicitly set it on the underlying function object:: See :ref:`types` for more information. +.. index:: + single: code object + object: code + .. _bltin-code-objects: Code Objects ------------ -.. index:: object: code - .. index:: builtin: compile single: __code__ (function object attribute) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index c0b4930..f34ba9f 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -847,8 +847,10 @@ Internal types mentioned here for completeness. Code objects + .. index:: single: bytecode + single: code object object: code Code objects represent *byte-compiled* executable Python code, or :term:`bytecode`. -- 2.8.2