summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-01-01 06:27:56 (GMT)
committerGitHub <noreply@github.com>2020-01-01 06:27:56 (GMT)
commitdad526eb36530186f625a2724c8835fe3df3c8c1 (patch)
treee4492c14ca9074408ca43d2ab615ab51fbfcf15e /Objects
parent6c004955aceb8a0cd8e14afbc608ebfdf7c8aa4a (diff)
downloadcpython-dad526eb36530186f625a2724c8835fe3df3c8c1.zip
cpython-dad526eb36530186f625a2724c8835fe3df3c8c1.tar.gz
cpython-dad526eb36530186f625a2724c8835fe3df3c8c1.tar.bz2
Document CodeType.replace (GH-17776)
(cherry picked from commit 22424c02e51fab3b62cbe255d0b87d1b55b9a6c3) Co-authored-by: Anthony Sottile <asottile@umich.edu>
Diffstat (limited to 'Objects')
-rw-r--r--Objects/clinic/codeobject.c.h4
-rw-r--r--Objects/codeobject.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h
index 6596de0..1dd8227 100644
--- a/Objects/clinic/codeobject.c.h
+++ b/Objects/clinic/codeobject.c.h
@@ -11,7 +11,7 @@ PyDoc_STRVAR(code_replace__doc__,
" co_lnotab=None)\n"
"--\n"
"\n"
-"Return a new code object with new specified fields.");
+"Return a copy of the code object with new values for the specified fields.");
#define CODE_REPLACE_METHODDEF \
{"replace", (PyCFunction)(void(*)(void))code_replace, METH_FASTCALL|METH_KEYWORDS, code_replace__doc__},
@@ -253,4 +253,4 @@ skip_optional_kwonly:
exit:
return return_value;
}
-/*[clinic end generated code: output=fade581d6313a0c2 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=27fe34e82106b220 input=a9049054013a1b77]*/
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index f0b62ec..522e1a9 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -610,7 +610,7 @@ code.replace
co_name: unicode(c_default="self->co_name") = None
co_lnotab: PyBytesObject(c_default="(PyBytesObject *)self->co_lnotab") = None
-Return a new code object with new specified fields.
+Return a copy of the code object with new values for the specified fields.
[clinic start generated code]*/
static PyObject *
@@ -622,7 +622,7 @@ code_replace_impl(PyCodeObject *self, int co_argcount,
PyObject *co_varnames, PyObject *co_freevars,
PyObject *co_cellvars, PyObject *co_filename,
PyObject *co_name, PyBytesObject *co_lnotab)
-/*[clinic end generated code: output=25c8e303913bcace input=77189e46579ec426]*/
+/*[clinic end generated code: output=25c8e303913bcace input=d9051bc8f24e6b28]*/
{
#define CHECK_INT_ARG(ARG) \
if (ARG < 0) { \