diff options
author | Daler <48939169+daler-sz@users.noreply.github.com> | 2024-02-18 14:13:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-18 14:13:46 (GMT) |
commit | 0c80da4c14d904a367968955544dd6ae58c8101c (patch) | |
tree | df7e75c117d1074a6cff472775bd85af27b31bb3 /Doc/reference/datamodel.rst | |
parent | 371c9708863c23ddc716085198ab07fa49968166 (diff) | |
download | cpython-0c80da4c14d904a367968955544dd6ae58c8101c.zip cpython-0c80da4c14d904a367968955544dd6ae58c8101c.tar.gz cpython-0c80da4c14d904a367968955544dd6ae58c8101c.tar.bz2 |
gh-115572: Move `codeobject.replace()` docs to the data model (#115631)
Diffstat (limited to 'Doc/reference/datamodel.rst')
-rw-r--r-- | Doc/reference/datamodel.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 88bc025..afeb659 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1292,6 +1292,14 @@ 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. + + Code objects are also supported by the generic function :func:`copy.replace`. + + .. versionadded:: 3.8 + .. _frame-objects: |