Skip to content

Commit b8c90e7

Browse files
gh-137609: Change names of some positional-only parameters in builtins (GH-137611)
This is for a pair with GH-137610.
1 parent 65fb4d1 commit b8c90e7

File tree

4 files changed

+42
-42
lines changed

4 files changed

+42
-42
lines changed

Objects/clinic/enumobject.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Objects/enumobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,15 +367,15 @@ typedef struct {
367367
@classmethod
368368
reversed.__new__ as reversed_new
369369
370-
sequence as seq: object
370+
object as seq: object
371371
/
372372
373373
Return a reverse iterator over the values of the given sequence.
374374
[clinic start generated code]*/
375375

376376
static PyObject *
377377
reversed_new_impl(PyTypeObject *type, PyObject *seq)
378-
/*[clinic end generated code: output=f7854cc1df26f570 input=aeb720361e5e3f1d]*/
378+
/*[clinic end generated code: output=f7854cc1df26f570 input=4781869729e3ba50]*/
379379
{
380380
Py_ssize_t n;
381381
PyObject *reversed_meth;

Python/bltinmodule.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -290,17 +290,17 @@ builtin___import___impl(PyObject *module, PyObject *name, PyObject *globals,
290290
/*[clinic input]
291291
abs as builtin_abs
292292
293-
x: object
293+
number: object
294294
/
295295
296296
Return the absolute value of the argument.
297297
[clinic start generated code]*/
298298

299299
static PyObject *
300-
builtin_abs(PyObject *module, PyObject *x)
301-
/*[clinic end generated code: output=b1b433b9e51356f5 input=bed4ca14e29c20d1]*/
300+
builtin_abs(PyObject *module, PyObject *number)
301+
/*[clinic end generated code: output=861a9db97dee0595 input=a356196903543505]*/
302302
{
303-
return PyNumber_Absolute(x);
303+
return PyNumber_Absolute(number);
304304
}
305305

306306
/*[clinic input]
@@ -426,7 +426,7 @@ builtin_ascii(PyObject *module, PyObject *obj)
426426
/*[clinic input]
427427
bin as builtin_bin
428428
429-
number: object
429+
integer: object
430430
/
431431
432432
Return the binary representation of an integer.
@@ -436,10 +436,10 @@ Return the binary representation of an integer.
436436
[clinic start generated code]*/
437437

438438
static PyObject *
439-
builtin_bin(PyObject *module, PyObject *number)
440-
/*[clinic end generated code: output=b6fc4ad5e649f4f7 input=53f8a0264bacaf90]*/
439+
builtin_bin(PyObject *module, PyObject *integer)
440+
/*[clinic end generated code: output=533f9388441805cc input=d16518f148341e70]*/
441441
{
442-
return PyNumber_ToBase(number, 2);
442+
return PyNumber_ToBase(integer, 2);
443443
}
444444

445445

@@ -1780,7 +1780,7 @@ builtin_hash(PyObject *module, PyObject *obj)
17801780
/*[clinic input]
17811781
hex as builtin_hex
17821782
1783-
number: object
1783+
integer: object
17841784
/
17851785
17861786
Return the hexadecimal representation of an integer.
@@ -1790,10 +1790,10 @@ Return the hexadecimal representation of an integer.
17901790
[clinic start generated code]*/
17911791

17921792
static PyObject *
1793-
builtin_hex(PyObject *module, PyObject *number)
1794-
/*[clinic end generated code: output=e46b612169099408 input=e645aff5fc7d540e]*/
1793+
builtin_hex(PyObject *module, PyObject *integer)
1794+
/*[clinic end generated code: output=e5de857ba61aae08 input=3bef4746efc62fac]*/
17951795
{
1796-
return PyNumber_ToBase(number, 16);
1796+
return PyNumber_ToBase(integer, 16);
17971797
}
17981798

17991799

@@ -1847,7 +1847,7 @@ PyObject *PyAnextAwaitable_New(PyObject *, PyObject *);
18471847
/*[clinic input]
18481848
anext as builtin_anext
18491849
1850-
aiterator: object
1850+
async_iterator as aiterator: object
18511851
default: object = NULL
18521852
/
18531853
@@ -1860,7 +1860,7 @@ it is returned instead of raising StopAsyncIteration.
18601860
static PyObject *
18611861
builtin_anext_impl(PyObject *module, PyObject *aiterator,
18621862
PyObject *default_value)
1863-
/*[clinic end generated code: output=f02c060c163a81fa input=2900e4a370d39550]*/
1863+
/*[clinic end generated code: output=f02c060c163a81fa input=f3dc5a93f073e5ac]*/
18641864
{
18651865
PyTypeObject *t;
18661866
PyObject *awaitable;
@@ -2099,7 +2099,7 @@ With two or more positional arguments, return the largest argument.");
20992099
/*[clinic input]
21002100
oct as builtin_oct
21012101
2102-
number: object
2102+
integer: object
21032103
/
21042104
21052105
Return the octal representation of an integer.
@@ -2109,10 +2109,10 @@ Return the octal representation of an integer.
21092109
[clinic start generated code]*/
21102110

21112111
static PyObject *
2112-
builtin_oct(PyObject *module, PyObject *number)
2113-
/*[clinic end generated code: output=40a34656b6875352 input=ad6b274af4016c72]*/
2112+
builtin_oct(PyObject *module, PyObject *integer)
2113+
/*[clinic end generated code: output=8c15f2145a74c390 input=b97c377b15fedf8d]*/
21142114
{
2115-
return PyNumber_ToBase(number, 8);
2115+
return PyNumber_ToBase(integer, 8);
21162116
}
21172117

21182118

@@ -2199,7 +2199,7 @@ builtin_pow_impl(PyObject *module, PyObject *base, PyObject *exp,
21992199
/*[clinic input]
22002200
print as builtin_print
22012201
2202-
*args: array
2202+
*objects: array
22032203
sep: object(c_default="Py_None") = ' '
22042204
string inserted between values, default a space.
22052205
end: object(c_default="Py_None") = '\n'
@@ -2214,10 +2214,10 @@ Prints the values to a stream, or to sys.stdout by default.
22142214
[clinic start generated code]*/
22152215

22162216
static PyObject *
2217-
builtin_print_impl(PyObject *module, PyObject * const *args,
2218-
Py_ssize_t args_length, PyObject *sep, PyObject *end,
2217+
builtin_print_impl(PyObject *module, PyObject * const *objects,
2218+
Py_ssize_t objects_length, PyObject *sep, PyObject *end,
22192219
PyObject *file, int flush)
2220-
/*[clinic end generated code: output=3cb7e5b66f1a8547 input=66ea4de1605a2437]*/
2220+
/*[clinic end generated code: output=38d8def56c837bcc input=ff35cb3d59ee8115]*/
22212221
{
22222222
int i, err;
22232223

@@ -2258,7 +2258,7 @@ builtin_print_impl(PyObject *module, PyObject * const *args,
22582258
return NULL;
22592259
}
22602260

2261-
for (i = 0; i < args_length; i++) {
2261+
for (i = 0; i < objects_length; i++) {
22622262
if (i > 0) {
22632263
if (sep == NULL) {
22642264
err = PyFile_WriteString(" ", file);
@@ -2271,7 +2271,7 @@ builtin_print_impl(PyObject *module, PyObject * const *args,
22712271
return NULL;
22722272
}
22732273
}
2274-
err = PyFile_WriteObject(args[i], file, Py_PRINT_RAW);
2274+
err = PyFile_WriteObject(objects[i], file, Py_PRINT_RAW);
22752275
if (err) {
22762276
Py_DECREF(file);
22772277
return NULL;

Python/clinic/bltinmodule.c.h

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)