summaryrefslogtreecommitdiff
path: root/Doc/library/shlex.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-09-02 20:34:52 +0000
committerGeorg Brandl <georg@python.org>2009-09-02 20:34:52 +0000
commit1824415470243ab8fb08172e2b32b4efe73e0295 (patch)
tree6246f8f0cd792ee5325bb49a87e9e46969963dda /Doc/library/shlex.rst
parent0bb1cc72c8e37a5ac53b800667693c4330beb5a3 (diff)
downloadcpython-git-1824415470243ab8fb08172e2b32b4efe73e0295.tar.gz
Switch more function arguments docs to new-style.
Diffstat (limited to 'Doc/library/shlex.rst')
-rw-r--r--Doc/library/shlex.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/library/shlex.rst b/Doc/library/shlex.rst
index ee241f4a52..0bc99fdc55 100644
--- a/Doc/library/shlex.rst
+++ b/Doc/library/shlex.rst
@@ -1,4 +1,3 @@
-
:mod:`shlex` --- Simple lexical analysis
========================================
@@ -18,7 +17,7 @@ applications) or for parsing quoted strings.
The :mod:`shlex` module defines the following functions:
-.. function:: split(s[, comments[, posix]])
+.. function:: split(s, comments=False, posix=True)
Split the string *s* using shell-like syntax. If *comments* is :const:`False`
(the default), the parsing of comments in the given string will be disabled
@@ -28,13 +27,14 @@ The :mod:`shlex` module defines the following functions:
.. note::
- Since the :func:`split` function instantiates a :class:`shlex` instance, passing
- ``None`` for *s* will read the string to split from standard input.
+ Since the :func:`split` function instantiates a :class:`shlex` instance,
+ passing ``None`` for *s* will read the string to split from standard
+ input.
The :mod:`shlex` module defines the following class:
-.. class:: shlex([instream[, infile[, posix]]])
+.. class:: shlex(instream=None, infile=None, posix=False)
A :class:`shlex` instance or subclass instance is a lexical analyzer object.
The initialization argument, if present, specifies where to read characters
@@ -111,7 +111,7 @@ A :class:`shlex` instance has the following methods:
:meth:`pop_source` methods.
-.. method:: shlex.push_source(stream[, filename])
+.. method:: shlex.push_source(newstream, newfile=None)
Push an input source stream onto the input stack. If the filename argument is
specified it will later be available for use in error messages. This is the
@@ -124,7 +124,7 @@ A :class:`shlex` instance has the following methods:
used internally when the lexer reaches EOF on a stacked input stream.
-.. method:: shlex.error_leader([file[, line]])
+.. method:: shlex.error_leader(infile=None, lineno=None)
This method generates an error message leader in the format of a Unix C compiler
error label; the format is ``'"%s", line %d: '``, where the ``%s`` is replaced