mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.11] gh-115572: Move codeobject.replace()
docs to the data model … (#115632)
* [3.11] gh-115572: Move `codeobject.replace()` docs to the data model (GH-115631)
(cherry picked from commit 0c80da4c14
)
Co-authored-by: Daler <48939169+daler-sz@users.noreply.github.com>
* Remove note about copy.replace
---------
Co-authored-by: Daler <48939169+daler-sz@users.noreply.github.com>
This commit is contained in:
parent
91262320da
commit
c69da47ac9
2 changed files with 7 additions and 7 deletions
|
@ -148,7 +148,7 @@ Standard names are defined for the following types:
|
|||
|
||||
.. index:: pair: built-in function; compile
|
||||
|
||||
The type for code objects such as returned by :func:`compile`.
|
||||
The type of :ref:`code objects <code-objects>` such as returned by :func:`compile`.
|
||||
|
||||
.. audit-event:: code.__new__ code,filename,name,argcount,posonlyargcount,kwonlyargcount,nlocals,stacksize,flags types.CodeType
|
||||
|
||||
|
@ -156,12 +156,6 @@ Standard names are defined for the following types:
|
|||
required by the initializer. The audit event only occurs for direct
|
||||
instantiation of code objects, and is not raised for normal compilation.
|
||||
|
||||
.. method:: CodeType.replace(**kwargs)
|
||||
|
||||
Return a copy of the code object with new values for the specified fields.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
|
||||
.. data:: CellType
|
||||
|
||||
The type for cell objects: such objects are used as containers for
|
||||
|
|
|
@ -1275,6 +1275,12 @@ Methods on code objects
|
|||
:pep:`626` - Precise line numbers for debugging and other tools.
|
||||
The PEP that introduced the :meth:`!co_lines` method.
|
||||
|
||||
.. method:: codeobject.replace(**kwargs)
|
||||
|
||||
Return a copy of the code object with new values for the specified fields.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
|
||||
|
||||
.. _frame-objects:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue