Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e927e25

Browse files
committed
#15865: add "*" in the signature to document keyword-only args in the docs. Patch by Chris Jerdonek.
1 parent b522828 commit e927e25

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

Doc/library/configparser.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ ConfigParser Objects
10071007
.. versionadded:: 3.2
10081008

10091009

1010-
.. method:: get(section, option, raw=False, [vars, fallback])
1010+
.. method:: get(section, option, *, raw=False, vars=None[, fallback])
10111011

10121012
Get an *option* value for the named *section*. If *vars* is provided, it
10131013
must be a dictionary. The *option* is looked up in *vars* (if provided),
@@ -1025,21 +1025,21 @@ ConfigParser Objects
10251025
(especially when using the mapping protocol).
10261026

10271027

1028-
.. method:: getint(section, option, raw=False, [vars, fallback])
1028+
.. method:: getint(section, option, *, raw=False, vars=None[, fallback])
10291029

10301030
A convenience method which coerces the *option* in the specified *section*
10311031
to an integer. See :meth:`get` for explanation of *raw*, *vars* and
10321032
*fallback*.
10331033

10341034

1035-
.. method:: getfloat(section, option, raw=False, [vars, fallback])
1035+
.. method:: getfloat(section, option, *, raw=False, vars=None[, fallback])
10361036

10371037
A convenience method which coerces the *option* in the specified *section*
10381038
to a floating point number. See :meth:`get` for explanation of *raw*,
10391039
*vars* and *fallback*.
10401040

10411041

1042-
.. method:: getboolean(section, option, raw=False, [vars, fallback])
1042+
.. method:: getboolean(section, option, *, raw=False, vars=None[, fallback])
10431043

10441044
A convenience method which coerces the *option* in the specified *section*
10451045
to a Boolean value. Note that the accepted values for the option are
@@ -1149,7 +1149,13 @@ ConfigParser Objects
11491149
RawConfigParser Objects
11501150
-----------------------
11511151

1152-
.. class:: RawConfigParser(defaults=None, dict_type=collections.OrderedDict, allow_no_value=False, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section=configaparser.DEFAULTSECT, interpolation=None)
1152+
.. class:: RawConfigParser(defaults=None, dict_type=collections.OrderedDict, \
1153+
allow_no_value=False, *, delimiters=('=', ':'), \
1154+
comment_prefixes=('#', ';'), \
1155+
inline_comment_prefixes=None, strict=True, \
1156+
empty_lines_in_values=True, \
1157+
default_section=configparser.DEFAULTSECT[, \
1158+
interpolation])
11531159
11541160
Legacy variant of the :class:`ConfigParser` with interpolation disabled
11551161
by default and unsafe ``add_section`` and ``set`` methods.

Doc/library/nntplib.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,10 +474,10 @@ The following are optional NNTP extensions defined in :rfc:`2980`. Some of
474474
them have been superseded by newer commands in :rfc:`3977`.
475475

476476

477-
.. method:: NNTP.xhdr(header, string, *, file=None)
477+
.. method:: NNTP.xhdr(hdr, str, *, file=None)
478478

479-
Send an ``XHDR`` command. The *header* argument is a header keyword, e.g.
480-
``'subject'``. The *string* argument should have the form ``'first-last'``
479+
Send an ``XHDR`` command. The *hdr* argument is a header keyword, e.g.
480+
``'subject'``. The *str* argument should have the form ``'first-last'``
481481
where *first* and *last* are the first and last article numbers to search.
482482
Return a pair ``(response, list)``, where *list* is a list of pairs ``(id,
483483
text)``, where *id* is an article number (as a string) and *text* is the text of

0 commit comments

Comments
 (0)