Skip to content

Commit 0f032ab

Browse files
Fix more.
1 parent 6a95300 commit 0f032ab

File tree

13 files changed

+34
-34
lines changed

13 files changed

+34
-34
lines changed

Doc/library/configparser.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,9 +1182,9 @@ ConfigParser Objects
11821182
in the same manner as the option.
11831183

11841184
.. versionchanged:: 3.2
1185-
Arguments *raw*, *vars* and *fallback* are keyword only to protect
1186-
users from trying to use the third argument as the *fallback* fallback
1187-
(especially when using the mapping protocol).
1185+
Parameters *raw*, *vars* and *fallback* are keyword-only to protect
1186+
users from trying to use the third positional argument as the
1187+
*fallback* (especially when using the mapping protocol).
11881188

11891189

11901190
.. method:: getint(section, option, *, raw=False, vars=None[, fallback])

Doc/library/inspect.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,9 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
172172
| | | references to local |
173173
| | | variables |
174174
+-----------------+-------------------+---------------------------+
175-
| code | co_argcount | number of arguments (not |
176-
| | | including keyword only |
177-
| | | arguments, \* or \*\* |
178-
| | | args) |
175+
| code | co_argcount | number of positional |
176+
| | | parameters (not including |
177+
| | | var-positional parameter) |
179178
+-----------------+-------------------+---------------------------+
180179
| | co_code | string of raw compiled |
181180
| | | bytecode |
@@ -206,12 +205,12 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
206205
| | | variables (referenced via |
207206
| | | a function's closure) |
208207
+-----------------+-------------------+---------------------------+
209-
| | co_posonlyargcount| number of positional only |
210-
| | | arguments |
208+
| | co_posonlyargcount| number of positional-only |
209+
| | | parameters |
211210
+-----------------+-------------------+---------------------------+
212-
| | co_kwonlyargcount | number of keyword only |
213-
| | | arguments (not including |
214-
| | | \*\* arg) |
211+
| | co_kwonlyargcount | number of keyword-only |
212+
| | | parameters (not including |
213+
| | | var-positional parameter) |
215214
+-----------------+-------------------+---------------------------+
216215
| | co_name | name with which this code |
217216
| | | object was defined |
@@ -956,7 +955,7 @@ function.
956955
| Name | Meaning |
957956
+========================+==============================================+
958957
| *POSITIONAL_ONLY* | Value must be supplied as a positional |
959-
| | argument. Positional only parameters are |
958+
| | argument. Positional-only parameters are |
960959
| | those which appear before a ``/`` entry (if |
961960
| | present) in a Python function definition. |
962961
+------------------------+----------------------------------------------+
@@ -971,7 +970,7 @@ function.
971970
| | Python function definition. |
972971
+------------------------+----------------------------------------------+
973972
| *KEYWORD_ONLY* | Value must be supplied as a keyword argument.|
974-
| | Keyword only parameters are those which |
973+
| | Keyword-only parameters are those which |
975974
| | appear after a ``*`` or ``*args`` entry in a |
976975
| | Python function definition. |
977976
+------------------------+----------------------------------------------+

Doc/library/multiprocessing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1603,7 +1603,7 @@ inherited by child processes.
16031603
automatically protected by a lock, so it will not necessarily be
16041604
"process-safe".
16051605

1606-
Note that *lock* is a keyword only argument.
1606+
Note that *lock* is a keyword-only parameter.
16071607

16081608
Note that an array of :data:`ctypes.c_char` has *value* and *raw*
16091609
attributes which allow one to use it to store and retrieve strings.

Doc/tutorial/controlflow.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ will always bind to the first parameter. For example::
879879
TypeError: foo() got multiple values for argument 'name'
880880
>>>
881881

882-
But using ``/`` (positional only arguments), it is possible since it allows ``name`` as a positional argument and ``'name'`` as a key in the keyword arguments::
882+
But using ``/`` (positional-only parameters), it is possible since it allows ``name`` as a positional argument and ``'name'`` as a key in the keyword arguments::
883883

884884
>>> def foo(name, /, **kwds):
885885
... return 'name' in kwds

Include/cpython/code.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ typedef struct {
7373
int co_flags; /* CO_..., see below */ \
7474
\
7575
/* The rest are not so impactful on performance. */ \
76-
int co_argcount; /* #arguments, except *args */ \
77-
int co_posonlyargcount; /* #positional only arguments */ \
78-
int co_kwonlyargcount; /* #keyword only arguments */ \
79-
int co_stacksize; /* #entries needed for evaluation stack */ \
76+
int co_argcount; /* # of positional parameters, except *args */ \
77+
int co_posonlyargcount; /* # of positional-only parameters */ \
78+
int co_kwonlyargcount; /* # of keyword-only parameters, except **kwargs */ \
79+
int co_stacksize; /* # of entries needed for evaluation stack */ \
8080
int co_firstlineno; /* first source line number */ \
8181
\
8282
/* redundant values (derived from co_localsplusnames and \

Lib/inspect.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ def iscode(object):
401401
"""Return true if the object is a code object.
402402
403403
Code objects provide these attributes:
404-
co_argcount number of arguments (not including *, ** args
405-
or keyword only arguments)
404+
co_argcount number of positional parameters (not including
405+
var-positional parameter)
406406
co_code string of raw compiled bytecode
407407
co_cellvars tuple of names of cell variables
408408
co_consts tuple of constants used in the bytecode
@@ -413,8 +413,9 @@ def iscode(object):
413413
| 256=iterable_coroutine | 512=async_generator
414414
| 0x4000000=has_docstring
415415
co_freevars tuple of names of free variables
416-
co_posonlyargcount number of positional only arguments
417-
co_kwonlyargcount number of keyword only arguments (not including ** arg)
416+
co_posonlyargcount number of positional-only parameters
417+
co_kwonlyargcount number of keyword-only parameters (not including
418+
var-keyword parameter)
418419
co_lnotab encoded mapping of line numbers to bytecode indices
419420
co_name name with which this code object was defined
420421
co_names tuple of names other than arguments and function locals

Misc/NEWS.d/3.10.0a4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ and the last exception was always silently ignored.
432432
.. nonce: qdEtZv
433433
.. section: Library
434434
435-
Fixed lib2to3.pgen2 to be able to parse PEP-570 positional only argument
435+
Fixed lib2to3.pgen2 to be able to parse PEP-570 positional-only parameter
436436
syntax.
437437

438438
..

Misc/NEWS.d/3.6.0a2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ lot of small objects.
484484
.. nonce: bHIfFA
485485
.. section: Library
486486
487-
New keyword only parameters in reset_mock call.
487+
New keyword-only parameters in :meth:`!reset_mock` call.
488488

489489
..
490490

Misc/NEWS.d/3.6.4rc1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ of browsing python files that do not end in .py.
10391039
.. nonce: LxN4Vb
10401040
.. section: IDLE
10411041
1042-
IDLE - Make _htest, _utest parameters keyword only.
1042+
IDLE - Make _htest, _utest parameters keyword-only.
10431043

10441044
..
10451045

Misc/NEWS.d/3.7.0a2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ of browsing python files that do not end in .py.
606606
.. nonce: LxN4Vb
607607
.. section: IDLE
608608
609-
IDLE - Make _htest, _utest parameters keyword only.
609+
IDLE - Make _htest, _utest parameters keyword-only.
610610

611611
..
612612

0 commit comments

Comments
 (0)