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

Skip to content

Commit b868a66

Browse files
committed
First batch of signature documentation changes; using default argument syntax where applicable.
1 parent acc9dcc commit b868a66

7 files changed

Lines changed: 19 additions & 18 deletions

File tree

Doc/library/abc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ It also provides the following decorators:
158158
multiple-inheritance.
159159

160160

161-
.. function:: abstractproperty(fget[, fset[, fdel[, doc]]])
161+
.. function:: abstractproperty(fget=None, fset=None, fdel=None, doc=None)
162162

163163
A subclass of the built-in :func:`property`, indicating an abstract property.
164164

Doc/library/aifc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ frame size of 4 bytes (2\*2), and a second's worth occupies 2\*2\*44100 bytes
3737
Module :mod:`aifc` defines the following function:
3838

3939

40-
.. function:: open(file[, mode])
40+
.. function:: open(file, mode=None)
4141

4242
Open an AIFF or AIFF-C file and return an object instance with methods that are
4343
described below. The argument *file* is either a string naming a file or a file

Doc/library/asynchat.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ asynchat - Auxiliary Classes and Functions
202202
------------------------------------------
203203

204204

205-
.. class:: simple_producer(data[, buffer_size=512])
205+
.. class:: simple_producer(data, buffer_size=512)
206206

207207
A :class:`simple_producer` takes a chunk of data and an optional buffer
208208
size. Repeated calls to its :meth:`more` method yield successive chunks of
@@ -215,7 +215,7 @@ asynchat - Auxiliary Classes and Functions
215215
empty string.
216216

217217

218-
.. class:: fifo([list=None])
218+
.. class:: fifo(list=None)
219219

220220
Each channel maintains a :class:`fifo` holding data which has been pushed
221221
by the application but not yet popped for writing to the channel. A

Doc/library/atexit.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ is killed by a signal, when a Python fatal internal error is detected, or when
1717
:func:`os._exit` is called.
1818

1919

20-
.. function:: register(func[, *args[, **kargs]])
20+
.. function:: register(func, *args, **kargs)
2121

2222
Register *func* as a function to be executed at termination. Any optional
2323
arguments that are to be passed to *func* must be passed as arguments to
@@ -48,7 +48,8 @@ is killed by a signal, when a Python fatal internal error is detected, or when
4848
.. seealso::
4949

5050
Module :mod:`readline`
51-
Useful example of :mod:`atexit` to read and write :mod:`readline` history files.
51+
Useful example of :mod:`atexit` to read and write :mod:`readline` history
52+
files.
5253

5354

5455
.. _atexit-example:

Doc/library/base64.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ well as strings, but only using the Base64 standard alphabet.
2323

2424
The modern interface provides:
2525

26-
.. function:: b64encode(s[, altchars])
26+
.. function:: b64encode(s, altchars=None)
2727

2828
Encode a string use Base64.
2929

@@ -36,7 +36,7 @@ The modern interface provides:
3636
The encoded string is returned.
3737

3838

39-
.. function:: b64decode(s[, altchars])
39+
.. function:: b64decode(s, altchars=None)
4040

4141
Decode a Base64 encoded string.
4242

@@ -78,7 +78,7 @@ The modern interface provides:
7878
is returned.
7979

8080

81-
.. function:: b32decode(s[, casefold[, map01]])
81+
.. function:: b32decode(s, casefold=False, map01=None)
8282

8383
Decode a Base32 encoded string.
8484

@@ -105,7 +105,7 @@ The modern interface provides:
105105
*s* is the string to encode. The encoded string is returned.
106106

107107

108-
.. function:: b16decode(s[, casefold])
108+
.. function:: b16decode(s, casefold=False)
109109

110110
Decode a Base16 encoded string.
111111

Doc/library/bdb.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The following exception is defined:
1616

1717
The :mod:`bdb` module also defines two classes:
1818

19-
.. class:: Breakpoint(self, file, line[, temporary=0[, cond=None [, funcname=None]]])
19+
.. class:: Breakpoint(self, file, line, temporary=0, cond=None, funcname=None)
2020

2121
This class implements temporary breakpoints, ignore counts, disabling and
2222
(re-)enabling, and conditionals.
@@ -50,7 +50,7 @@ The :mod:`bdb` module also defines two classes:
5050
Mark the breakpoint as disabled.
5151

5252

53-
.. method:: pprint([out])
53+
.. method:: bpprint(out=None)
5454

5555
Print all the information about the breakpoint:
5656

@@ -233,7 +233,7 @@ The :mod:`bdb` module also defines two classes:
233233
breakpoints. These methods return a string containing an error message if
234234
something went wrong, or ``None`` if all is well.
235235

236-
.. method:: set_break(filename, lineno[, temporary=0[, cond[, funcname]]])
236+
.. method:: set_break(filename, lineno, temporary=0, cond, funcname)
237237

238238
Set a new breakpoint. If the *lineno* line doesn't exist for the
239239
*filename* passed as argument, return an error message. The *filename*
@@ -285,7 +285,7 @@ The :mod:`bdb` module also defines two classes:
285285
Get a list of records for a frame and all higher (calling) and lower
286286
frames, and the size of the higher part.
287287

288-
.. method:: format_stack_entry(frame_lineno, [lprefix=': '])
288+
.. method:: format_stack_entry(frame_lineno, lprefix=': ')
289289

290290
Return a string with information about a stack entry, identified by a
291291
``(frame, lineno)`` tuple:
@@ -300,12 +300,12 @@ The :mod:`bdb` module also defines two classes:
300300
The following two methods can be called by clients to use a debugger to debug
301301
a :term:`statement`, given as a string.
302302

303-
.. method:: run(cmd, [globals, [locals]])
303+
.. method:: run(cmd, globals=None, locals=None)
304304

305305
Debug a statement executed via the :func:`exec` function. *globals*
306306
defaults to :attr:`__main__.__dict__`, *locals* defaults to *globals*.
307307

308-
.. method:: runeval(expr, [globals, [locals]])
308+
.. method:: runeval(expr, globals=None, locals=None)
309309

310310
Debug an expression executed via the :func:`eval` function. *globals* and
311311
*locals* have the same meaning as in :meth:`run`.

Doc/library/binascii.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ The :mod:`binascii` module defines the following functions:
4949
should be at most 57 to adhere to the base64 standard.
5050

5151

52-
.. function:: a2b_qp(string[, header])
52+
.. function:: a2b_qp(string, header=False)
5353

5454
Convert a block of quoted-printable data back to binary and return the binary
5555
data. More than one line may be passed at a time. If the optional argument
5656
*header* is present and true, underscores will be decoded as spaces.
5757

5858

59-
.. function:: b2a_qp(data[, quotetabs, istext, header])
59+
.. function:: b2a_qp(data, quotetabs=False, istext=True, header=False)
6060

6161
Convert binary data to a line(s) of ASCII characters in quoted-printable
6262
encoding. The return value is the converted line(s). If the optional argument

0 commit comments

Comments
 (0)