]> granicus.if.org Git - python/commitdiff
Restore [] where default arguments are not keywords
authorHynek Schlawack <hs@ox.cx>
Tue, 22 May 2012 13:22:14 +0000 (15:22 +0200)
committerHynek Schlawack <hs@ox.cx>
Tue, 22 May 2012 13:22:14 +0000 (15:22 +0200)
Reverts some changes of a36666c52115.

In the case of os's `mknod(filename[, mode=0600[, device=0]])`, I have nested
the [] as setting mode doesn't require to set device (but setting device
requires to set mode).

Doc/library/dl.rst
Doc/library/itertools.rst
Doc/library/os.rst
Doc/library/ossaudiodev.rst

index 92de1dca04e7436e4f74820d0ce3f7b1923e8395..40556cc80990498c03d1a9eed85aa00ee81129cc 100644 (file)
@@ -31,7 +31,7 @@ libraries. It allows the program to call arbitrary functions in such a library.
 The :mod:`dl` module defines the following function:
 
 
-.. function:: open(name, mode=RTLD_LAZY)
+.. function:: open(name[, mode=RTLD_LAZY])
 
    Open a shared object file, and return a handle. Mode signifies late binding
    (:const:`RTLD_LAZY`) or immediate binding (:const:`RTLD_NOW`). Default is
index 477ea86fba76c2b44d5d3022920fe38c8ea4d114..a553d09964e345215f43048192fab1e646b33425 100644 (file)
@@ -627,7 +627,7 @@ loops that truncate the stream.
                   break
 
 
-.. function:: tee(iterable, n=2)
+.. function:: tee(iterable[, n=2])
 
    Return *n* independent iterators from a single iterable.  Equivalent to::
 
index 8569f82b440a1485b85b6ead53ecda92e2947ce6..025042a28c4661c3046c7b351258f83782c63f08 100644 (file)
@@ -1181,7 +1181,7 @@ Files and Directories
    doesn't open the FIFO --- it just creates the rendezvous point.
 
 
-.. function:: mknod(filename, mode=0600, device=0)
+.. function:: mknod(filename[, mode=0600[, device=0]])
 
    Create a filesystem node (file, device special file or named pipe) named
    *filename*. *mode* specifies both the permissions to use and the type of node to
index 515c701900d4e76237adc59aa20a62ff04a0ad4d..08f118f78ae811823b21408cf8718562f4e1dee6 100644 (file)
@@ -275,7 +275,7 @@ The following convenience methods combine several ioctls, or one ioctl and some
 simple calculations.
 
 
-.. method:: oss_audio_device.setparameters(format, nchannels, samplerate, strict=False)
+.. method:: oss_audio_device.setparameters(format, nchannels, samplerate[, strict=False])
 
    Set the key audio sampling parameters---sample format, number of channels, and
    sampling rate---in one method call.  *format*,  *nchannels*, and *samplerate*