https://github.com/python/cpython/commit/ae6c01d9d27dd6fb0805340a34f5011b7c1d5e7e
commit: ae6c01d9d27dd6fb0805340a34f5011b7c1d5e7e
branch: 3.12
author: Kirill Podoprigora <[email protected]>
committer: AlexWaygood <[email protected]>
date: 2024-02-18T14:38:33Z
summary:

[3.12] gh-115572: Move `codeobject.replace()` docs to the data model … (#115633)

* [3.12] gh-115572: Move `codeobject.replace()` docs to the data model 
(GH-115631)
(cherry picked from commit 0c80da4c14d904a367968955544dd6ae58c8101c)

Co-authored-by: Daler <[email protected]>

* Remove note about copy.replace

---------

Co-authored-by: Daler <[email protected]>

files:
M Doc/library/types.rst
M Doc/reference/datamodel.rst

diff --git a/Doc/library/types.rst b/Doc/library/types.rst
index f9e0ba4567bef7..3c426498f02481 100644
--- a/Doc/library/types.rst
+++ b/Doc/library/types.rst
@@ -188,7 +188,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
 
@@ -196,12 +196,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
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 6292a1daabc32c..a05f5d70a25b89 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1292,6 +1292,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:
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to