Skip to content

Commit

Permalink
[3.11] Fix typos in bltinmodule.c. (GH-97789)
Browse files Browse the repository at this point in the history
(cherry picked from commit 873a2f2)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
  • Loading branch information
benjaminp and sobolevn authored Oct 3, 2022
1 parent 096e396 commit 4d4b1e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions Python/bltinmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions Python/clinic/bltinmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4d4b1e6

Please sign in to comment.