summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2022-10-03 20:10:14 (GMT)
committerGitHub <noreply@github.com>2022-10-03 20:10:14 (GMT)
commit4d4b1e6c0b4b71cdf0438279ee11f1f49104e422 (patch)
treec9b608f69039e9ac4a8ca8028645a5ffa0d385a9 /Python
parent096e39637b74d669dea3132442eccb2d65e8b6da (diff)
downloadcpython-4d4b1e6c0b4b71cdf0438279ee11f1f49104e422.zip
cpython-4d4b1e6c0b4b71cdf0438279ee11f1f49104e422.tar.gz
cpython-4d4b1e6c0b4b71cdf0438279ee11f1f49104e422.tar.bz2
[3.11] Fix typos in `bltinmodule.c`. (GH-97789)
(cherry picked from commit 873a2f25272ca9fb027866a9730c44ba627b30cc) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c14
-rw-r--r--Python/clinic/bltinmodule.c.h10
2 files changed, 12 insertions, 12 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 072bf75..94a7819 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -260,8 +260,8 @@ importlib.import_module() to programmatically import a module.
The globals argument is only used to determine the context;
they are not modified. The locals argument is unused. The fromlist
-should be a list of names to emulate ``from name import ...'', or an
-empty list to emulate ``import name''.
+should be a list of names to emulate ``from name import ...``, or an
+empty list to emulate ``import name``.
When importing a module from a package, note that __import__('A.B', ...)
returns package A when fromlist is empty, but its submodule B when
fromlist is not empty. The level argument is used to determine whether to
@@ -272,7 +272,7 @@ is the number of parent directories to search relative to the current module.
static PyObject *
builtin___import___impl(PyObject *module, PyObject *name, PyObject *globals,
PyObject *locals, PyObject *fromlist, int level)
-/*[clinic end generated code: output=4febeda88a0cd245 input=35e9a6460412430f]*/
+/*[clinic end generated code: output=4febeda88a0cd245 input=73f4b960ea5b9dd6]*/
{
return PyImport_ImportModuleLevelObject(name, globals, locals,
fromlist, level);
@@ -1509,13 +1509,13 @@ setattr as builtin_setattr
Sets the named attribute on the given object to the specified value.
-setattr(x, 'y', v) is equivalent to ``x.y = v''
+setattr(x, 'y', v) is equivalent to ``x.y = v``
[clinic start generated code]*/
static PyObject *
builtin_setattr_impl(PyObject *module, PyObject *obj, PyObject *name,
PyObject *value)
-/*[clinic end generated code: output=dc2ce1d1add9acb4 input=bd2b7ca6875a1899]*/
+/*[clinic end generated code: output=dc2ce1d1add9acb4 input=5e26417f2e8598d4]*/
{
if (PyObject_SetAttr(obj, name, value) != 0)
return NULL;
@@ -1532,12 +1532,12 @@ delattr as builtin_delattr
Deletes the named attribute from the given object.
-delattr(x, 'y') is equivalent to ``del x.y''
+delattr(x, 'y') is equivalent to ``del x.y``
[clinic start generated code]*/
static PyObject *
builtin_delattr_impl(PyObject *module, PyObject *obj, PyObject *name)
-/*[clinic end generated code: output=85134bc58dff79fa input=db16685d6b4b9410]*/
+/*[clinic end generated code: output=85134bc58dff79fa input=164865623abe7216]*/
{
if (PyObject_SetAttr(obj, name, (PyObject *)NULL) != 0)
return NULL;
diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h
index 48f6509..5d9a16a 100644
--- a/Python/clinic/bltinmodule.c.h
+++ b/Python/clinic/bltinmodule.c.h
@@ -15,8 +15,8 @@ PyDoc_STRVAR(builtin___import____doc__,
"\n"
"The globals argument is only used to determine the context;\n"
"they are not modified. The locals argument is unused. The fromlist\n"
-"should be a list of names to emulate ``from name import ...\'\', or an\n"
-"empty list to emulate ``import name\'\'.\n"
+"should be a list of names to emulate ``from name import ...``, or an\n"
+"empty list to emulate ``import name``.\n"
"When importing a module from a package, note that __import__(\'A.B\', ...)\n"
"returns package A when fromlist is empty, but its submodule B when\n"
"fromlist is not empty. The level argument is used to determine whether to\n"
@@ -539,7 +539,7 @@ PyDoc_STRVAR(builtin_setattr__doc__,
"\n"
"Sets the named attribute on the given object to the specified value.\n"
"\n"
-"setattr(x, \'y\', v) is equivalent to ``x.y = v\'\'");
+"setattr(x, \'y\', v) is equivalent to ``x.y = v``");
#define BUILTIN_SETATTR_METHODDEF \
{"setattr", _PyCFunction_CAST(builtin_setattr), METH_FASTCALL, builtin_setattr__doc__},
@@ -574,7 +574,7 @@ PyDoc_STRVAR(builtin_delattr__doc__,
"\n"
"Deletes the named attribute from the given object.\n"
"\n"
-"delattr(x, \'y\') is equivalent to ``del x.y\'\'");
+"delattr(x, \'y\') is equivalent to ``del x.y``");
#define BUILTIN_DELATTR_METHODDEF \
{"delattr", _PyCFunction_CAST(builtin_delattr), METH_FASTCALL, builtin_delattr__doc__},
@@ -1045,4 +1045,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=a2c5c53e8aead7c3 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=cc844ea007c1241f input=a9049054013a1b77]*/