Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
cd7f32b6
Commit
cd7f32b6
authored
Jun 08, 2009
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signature documentation style update, modules J, K, L and M.
parent
cdf8b34b
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
100 additions
and
116 deletions
+100
-116
Doc/library/json.rst
Doc/library/json.rst
+6
-7
Doc/library/keyword.rst
Doc/library/keyword.rst
+0
-1
Doc/library/language.rst
Doc/library/language.rst
+0
-1
Doc/library/linecache.rst
Doc/library/linecache.rst
+3
-3
Doc/library/locale.rst
Doc/library/locale.rst
+12
-13
Doc/library/logging.rst
Doc/library/logging.rst
+43
-40
Doc/library/macpath.rst
Doc/library/macpath.rst
+0
-1
Doc/library/mailbox.rst
Doc/library/mailbox.rst
+16
-19
Doc/library/mailcap.rst
Doc/library/mailcap.rst
+1
-2
Doc/library/markup.rst
Doc/library/markup.rst
+0
-1
Doc/library/marshal.rst
Doc/library/marshal.rst
+0
-1
Doc/library/math.rst
Doc/library/math.rst
+0
-1
Doc/library/mimetypes.rst
Doc/library/mimetypes.rst
+8
-9
Doc/library/misc.rst
Doc/library/misc.rst
+0
-1
Doc/library/mm.rst
Doc/library/mm.rst
+0
-1
Doc/library/mmap.rst
Doc/library/mmap.rst
+3
-4
Doc/library/modulefinder.rst
Doc/library/modulefinder.rst
+1
-2
Doc/library/modules.rst
Doc/library/modules.rst
+0
-1
Doc/library/msilib.rst
Doc/library/msilib.rst
+7
-7
Doc/library/msvcrt.rst
Doc/library/msvcrt.rst
+0
-1
No files found.
Doc/library/json.rst
View file @
cd7f32b6
...
@@ -112,7 +112,7 @@ Using json.tool from the shell to validate and pretty-print::
...
@@ -112,7 +112,7 @@ Using json.tool from the shell to validate and pretty-print::
Basic Usage
Basic Usage
-----------
-----------
.. function:: dump(obj, fp
[, skipkeys[, ensure_ascii[, check_circular[, allow_nan[, cls[, indent[, separators[, default[, **kw]]]]]]]]]]
)
.. function:: dump(obj, fp
, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, **kw
)
Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-supporting
Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-supporting
file-like object).
file-like object).
...
@@ -126,7 +126,6 @@ Basic Usage
...
@@ -126,7 +126,6 @@ Basic Usage
:class:`bytes` objects. Therefore, ``fp.write()`` must support :class:`str`
:class:`bytes` objects. Therefore, ``fp.write()`` must support :class:`str`
input.
input.
If *check_circular* is ``False`` (default: ``True``), then the circular
If *check_circular* is ``False`` (default: ``True``), then the circular
reference check for container types will be skipped and a circular reference
reference check for container types will be skipped and a circular reference
will result in an :exc:`OverflowError` (or worse).
will result in an :exc:`OverflowError` (or worse).
...
@@ -153,13 +152,13 @@ Basic Usage
...
@@ -153,13 +152,13 @@ Basic Usage
*cls* kwarg.
*cls* kwarg.
.. function:: dumps(obj
[, skipkeys[, ensure_ascii[, check_circular[, allow_nan[, cls[, indent[, separators[, default[, **kw]]]]]]]]]]
)
.. function:: dumps(obj
, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, **kw
)
Serialize *obj* to a JSON formatted :class:`str`. The arguments have the
Serialize *obj* to a JSON formatted :class:`str`. The arguments have the
same meaning as in :func:`dump`.
same meaning as in :func:`dump`.
.. function:: load(fp
[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, object_pairs_hook[, **kw]]]]]]]]
)
.. function:: load(fp
, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw
)
Deserialize *fp* (a ``.read()``-supporting file-like object containing a JSON
Deserialize *fp* (a ``.read()``-supporting file-like object containing a JSON
document) to a Python object.
document) to a Python object.
...
@@ -200,7 +199,7 @@ Basic Usage
...
@@ -200,7 +199,7 @@ Basic Usage
class.
class.
.. function:: loads(s
[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, object_pairs_hook[, **kw]]]]]]]]
)
.. function:: loads(s
, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw
)
Deserialize *s* (a :class:`str` or :class:`unicode` instance containing a JSON
Deserialize *s* (a :class:`str` or :class:`unicode` instance containing a JSON
document) to a Python object.
document) to a Python object.
...
@@ -216,7 +215,7 @@ Basic Usage
...
@@ -216,7 +215,7 @@ Basic Usage
Encoders and decoders
Encoders and decoders
---------------------
---------------------
.. class:: JSONDecoder(
[encoding[, object_hook[, parse_float[, parse_int[, parse_constant[, strict[, object_pairs_hook]]]]]]]
)
.. class:: JSONDecoder(
object_hook=None, parse_float=None, parse_int=None, parse_constant=None, strict=True, object_pairs_hook=None
)
Simple JSON decoder.
Simple JSON decoder.
...
@@ -292,7 +291,7 @@ Encoders and decoders
...
@@ -292,7 +291,7 @@ Encoders and decoders
extraneous data at the end.
extraneous data at the end.
.. class:: JSONEncoder(
[skipkeys[, ensure_ascii[, check_circular[, allow_nan[, sort_keys[, indent[, separators[, default]]]]]]]]
)
.. class:: JSONEncoder(
skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None
)
Extensible JSON encoder for Python data structures.
Extensible JSON encoder for Python data structures.
...
...
Doc/library/keyword.rst
View file @
cd7f32b6
:mod:`keyword` --- Testing for Python keywords
:mod:`keyword` --- Testing for Python keywords
==============================================
==============================================
...
...
Doc/library/language.rst
View file @
cd7f32b6
.. _language:
.. _language:
************************
************************
...
...
Doc/library/linecache.rst
View file @
cd7f32b6
:mod:`linecache` --- Random access to text lines
:mod:`linecache` --- Random access to text lines
================================================
================================================
...
@@ -15,7 +14,7 @@ to retrieve source lines for inclusion in the formatted traceback.
...
@@ -15,7 +14,7 @@ to retrieve source lines for inclusion in the formatted traceback.
The :mod:`linecache` module defines the following functions:
The :mod:`linecache` module defines the following functions:
.. function:: getline(filename, lineno
[, module_globals]
)
.. function:: getline(filename, lineno
, module_globals=None
)
Get line *lineno* from file named *filename*. This function will never throw an
Get line *lineno* from file named *filename*. This function will never throw an
exception --- it will return ``''`` on errors (the terminating newline character
exception --- it will return ``''`` on errors (the terminating newline character
...
@@ -35,12 +34,13 @@ The :mod:`linecache` module defines the following functions:
...
@@ -35,12 +34,13 @@ The :mod:`linecache` module defines the following functions:
previously read using :func:`getline`.
previously read using :func:`getline`.
.. function:: checkcache(
[filename]
)
.. function:: checkcache(
filename=None
)
Check the cache for validity. Use this function if files in the cache may have
Check the cache for validity. Use this function if files in the cache may have
changed on disk, and you require the updated version. If *filename* is omitted,
changed on disk, and you require the updated version. If *filename* is omitted,
it will check all the entries in the cache.
it will check all the entries in the cache.
Example::
Example::
>>> import linecache
>>> import linecache
...
...
Doc/library/locale.rst
View file @
cd7f32b6
:mod:`locale` --- Internationalization services
:mod:`locale` --- Internationalization services
===============================================
===============================================
...
@@ -26,7 +25,7 @@ The :mod:`locale` module defines the following exception and functions:
...
@@ -26,7 +25,7 @@ The :mod:`locale` module defines the following exception and functions:
Exception raised when :func:`setlocale` fails.
Exception raised when :func:`setlocale` fails.
.. function:: setlocale(category
[, locale]
)
.. function:: setlocale(category
, locale=None
)
If *locale* is specified, it may be a string, a tuple of the form ``(language
If *locale* is specified, it may be a string, a tuple of the form ``(language
code, encoding)``, or ``None``. If it is a tuple, it is converted to a string
code, encoding)``, or ``None``. If it is a tuple, it is converted to a string
...
@@ -151,7 +150,7 @@ The :mod:`locale` module defines the following exception and functions:
...
@@ -151,7 +150,7 @@ The :mod:`locale` module defines the following exception and functions:
constants are available in the locale module.
constants are available in the locale module.
.. function:: getdefaultlocale(
[envvars]
)
.. function:: getdefaultlocale(
envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE')
)
Tries to determine the default locale settings and returns them as a tuple of
Tries to determine the default locale settings and returns them as a tuple of
the form ``(language code, encoding)``.
the form ``(language code, encoding)``.
...
@@ -164,17 +163,17 @@ The :mod:`locale` module defines the following exception and functions:
...
@@ -164,17 +163,17 @@ The :mod:`locale` module defines the following exception and functions:
To maintain compatibility with other platforms, not only the :envvar:`LANG`
To maintain compatibility with other platforms, not only the :envvar:`LANG`
variable is tested, but a list of variables given as envvars parameter. The
variable is tested, but a list of variables given as envvars parameter. The
first found to be defined will be used. *envvars* defaults to the search
path
first found to be defined will be used. *envvars* defaults to the search
used in GNU gettext; it must always contain the variable name ``LANG``. The GNU
path used in GNU gettext; it must always contain the variable name
gettext search path contains ``'LANGUAGE'``, ``'LC_ALL'``, ``'LC_CTYPE'``, and
``'LANG'``. The GNU gettext search path contains ``'LC_ALL'``,
``'L
ANG
'``, in that order.
``'L
C_CTYPE'``, ``'LANG'`` and ``'LANGUAGE
'``, in that order.
Except for the code ``'C'``, the language code corresponds to :rfc:`1766`.
Except for the code ``'C'``, the language code corresponds to :rfc:`1766`.
*language code* and *encoding* may be ``None`` if their values cannot be
*language code* and *encoding* may be ``None`` if their values cannot be
determined.
determined.
.. function:: getlocale(
[category]
)
.. function:: getlocale(
category=LC_CTYPE
)
Returns the current setting for the given locale category as sequence containing
Returns the current setting for the given locale category as sequence containing
*language code*, *encoding*. *category* may be one of the :const:`LC_\*` values
*language code*, *encoding*. *category* may be one of the :const:`LC_\*` values
...
@@ -185,7 +184,7 @@ The :mod:`locale` module defines the following exception and functions:
...
@@ -185,7 +184,7 @@ The :mod:`locale` module defines the following exception and functions:
determined.
determined.
.. function:: getpreferredencoding(
[do_setlocale]
)
.. function:: getpreferredencoding(
do_setlocale=True
)
Return the encoding used for text data, according to user preferences. User
Return the encoding used for text data, according to user preferences. User
preferences are expressed differently on different systems, and might not be
preferences are expressed differently on different systems, and might not be
...
@@ -207,7 +206,7 @@ The :mod:`locale` module defines the following exception and functions:
...
@@ -207,7 +206,7 @@ The :mod:`locale` module defines the following exception and functions:
encoding for the locale code just like :func:`setlocale`.
encoding for the locale code just like :func:`setlocale`.
.. function:: resetlocale(
[category]
)
.. function:: resetlocale(
category=LC_ALL
)
Sets the locale for *category* to the default setting.
Sets the locale for *category* to the default setting.
...
@@ -232,7 +231,7 @@ The :mod:`locale` module defines the following exception and functions:
...
@@ -232,7 +231,7 @@ The :mod:`locale` module defines the following exception and functions:
sequence of strings.
sequence of strings.
.. function:: format(format, val
[, grouping[, monetary]]
)
.. function:: format(format, val
, grouping=False, monetary=False
)
Formats a number *val* according to the current :const:`LC_NUMERIC` setting.
Formats a number *val* according to the current :const:`LC_NUMERIC` setting.
The format follows the conventions of the ``%`` operator. For floating point
The format follows the conventions of the ``%`` operator. For floating point
...
@@ -246,13 +245,13 @@ The :mod:`locale` module defines the following exception and functions:
...
@@ -246,13 +245,13 @@ The :mod:`locale` module defines the following exception and functions:
For whole format strings, use :func:`format_string`.
For whole format strings, use :func:`format_string`.
.. function:: format_string(format, val
[, grouping]
)
.. function:: format_string(format, val
, grouping=False
)
Processes formatting specifiers as in ``format % val``, but takes the current
Processes formatting specifiers as in ``format % val``, but takes the current
locale settings into account.
locale settings into account.
.. function:: currency(val
[, symbol[, grouping[, international]]]
)
.. function:: currency(val
, symbol=True, grouping=False, international=False
)
Formats a number *val* according to the current :const:`LC_MONETARY` settings.
Formats a number *val* according to the current :const:`LC_MONETARY` settings.
...
...
Doc/library/logging.rst
View file @
cd7f32b6
This diff is collapsed.
Click to expand it.
Doc/library/macpath.rst
View file @
cd7f32b6
:mod:`macpath` --- Mac OS 9 path manipulation functions
:mod:`macpath` --- Mac OS 9 path manipulation functions
=======================================================
=======================================================
...
...
Doc/library/mailbox.rst
View file @
cd7f32b6
:mod:`mailbox` --- Manipulate mailboxes in various formats
:mod:`mailbox` --- Manipulate mailboxes in various formats
==========================================================
==========================================================
...
@@ -27,7 +26,6 @@ Maildir, mbox, MH, Babyl, and MMDF.
...
@@ -27,7 +26,6 @@ Maildir, mbox, MH, Babyl, and MMDF.
:class:`Mailbox` objects
:class:`Mailbox` objects
------------------------
------------------------
.. class:: Mailbox
.. class:: Mailbox
A mailbox, which may be inspected and modified.
A mailbox, which may be inspected and modified.
...
@@ -154,7 +152,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
...
@@ -154,7 +152,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
when the :class:`Mailbox` instance was initialized.
when the :class:`Mailbox` instance was initialized.
.. method:: get(key
[, default=None]
)
.. method:: get(key
, default=None
)
__getitem__(key)
__getitem__(key)
Return a representation of the message corresponding to *key*. If no such
Return a representation of the message corresponding to *key*. If no such
...
@@ -209,11 +207,10 @@ Maildir, mbox, MH, Babyl, and MMDF.
...
@@ -209,11 +207,10 @@ Maildir, mbox, MH, Babyl, and MMDF.
Delete all messages from the mailbox.
Delete all messages from the mailbox.
.. method:: pop(key
[, default]
)
.. method:: pop(key
, default=None
)
Return a representation of the message corresponding to *key* and delete
Return a representation of the message corresponding to *key* and delete
the message. If no such message exists, return *default* if it was
the message. If no such message exists, return *default*. The message is
supplied or else raise a :exc:`KeyError` exception. The message is
represented as an instance of the appropriate format-specific
represented as an instance of the appropriate format-specific
:class:`Message` subclass unless a custom message factory was specified
:class:`Message` subclass unless a custom message factory was specified
when the :class:`Mailbox` instance was initialized.
when the :class:`Mailbox` instance was initialized.
...
@@ -277,7 +274,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
...
@@ -277,7 +274,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
.. class:: Maildir(dirname
[, factory=None[, create=True]]
)
.. class:: Maildir(dirname
, factory=None, create=True
)
A subclass of :class:`Mailbox` for mailboxes in Maildir format. Parameter
A subclass of :class:`Mailbox` for mailboxes in Maildir format. Parameter
*factory* is a callable object that accepts a file-like message representation
*factory* is a callable object that accepts a file-like message representation
...
@@ -419,7 +416,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
...
@@ -419,7 +416,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
^^^^^^^^^^^^^
^^^^^^^^^^^^^
.. class:: mbox(path
[, factory=None[, create=True]]
)
.. class:: mbox(path
, factory=None, create=True
)
A subclass of :class:`Mailbox` for mailboxes in mbox format. Parameter *factory*
A subclass of :class:`Mailbox` for mailboxes in mbox format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
is a callable object that accepts a file-like message representation (which
...
@@ -479,7 +476,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
...
@@ -479,7 +476,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
^^^^^^^^^^^
^^^^^^^^^^^
.. class:: MH(path
[, factory=None[, create=True]]
)
.. class:: MH(path
, factory=None, create=True
)
A subclass of :class:`Mailbox` for mailboxes in MH format. Parameter *factory*
A subclass of :class:`Mailbox` for mailboxes in MH format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
is a callable object that accepts a file-like message representation (which
...
@@ -609,7 +606,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
...
@@ -609,7 +606,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
^^^^^^^^^^^^^^
^^^^^^^^^^^^^^
.. class:: Babyl(path
[, factory=None[, create=True]]
)
.. class:: Babyl(path
, factory=None, create=True
)
A subclass of :class:`Mailbox` for mailboxes in Babyl format. Parameter
A subclass of :class:`Mailbox` for mailboxes in Babyl format. Parameter
*factory* is a callable object that accepts a file-like message representation
*factory* is a callable object that accepts a file-like message representation
...
@@ -685,7 +682,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
...
@@ -685,7 +682,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
^^^^^^^^^^^^^
^^^^^^^^^^^^^
.. class:: MMDF(path
[, factory=None[, create=True]]
)
.. class:: MMDF(path
, factory=None, create=True
)
A subclass of :class:`Mailbox` for mailboxes in MMDF format. Parameter *factory*
A subclass of :class:`Mailbox` for mailboxes in MMDF format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
is a callable object that accepts a file-like message representation (which
...
@@ -737,7 +734,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
...
@@ -737,7 +734,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
------------------------
------------------------
.. class:: Message(
[message]
)
.. class:: Message(
message=None
)
A subclass of the :mod:`email.Message` module's :class:`Message`. Subclasses of
A subclass of the :mod:`email.Message` module's :class:`Message`. Subclasses of
:class:`mailbox.Message` add mailbox-format-specific state and behavior.
:class:`mailbox.Message` add mailbox-format-specific state and behavior.
...
@@ -772,7 +769,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
...
@@ -772,7 +769,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^
.. class:: MaildirMessage(
[message]
)
.. class:: MaildirMessage(
message=None
)
A message with Maildir-specific behaviors. Parameter *message* has the same
A message with Maildir-specific behaviors. Parameter *message* has the same
meaning as with the :class:`Message` constructor.
meaning as with the :class:`Message` constructor.
...
@@ -940,7 +937,7 @@ When a :class:`MaildirMessage` instance is created based upon a
...
@@ -940,7 +937,7 @@ When a :class:`MaildirMessage` instance is created based upon a
^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^
.. class:: mboxMessage(
[message]
)
.. class:: mboxMessage(
message=None
)
A message with mbox-specific behaviors. Parameter *message* has the same meaning
A message with mbox-specific behaviors. Parameter *message* has the same meaning
as with the :class:`Message` constructor.
as with the :class:`Message` constructor.
...
@@ -983,7 +980,7 @@ When a :class:`MaildirMessage` instance is created based upon a
...
@@ -983,7 +980,7 @@ When a :class:`MaildirMessage` instance is created based upon a
are excluded.
are excluded.
.. method:: set_from(from_
[, time_=None]
)
.. method:: set_from(from_
, time_=None
)
Set the "From " line to *from_*, which should be specified without a
Set the "From " line to *from_*, which should be specified without a
leading "From " or trailing newline. For convenience, *time_* may be
leading "From " or trailing newline. For convenience, *time_* may be
...
@@ -1094,7 +1091,7 @@ instance, the "From " line is copied and all flags directly correspond:
...
@@ -1094,7 +1091,7 @@ instance, the "From " line is copied and all flags directly correspond:
^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^
.. class:: MHMessage(
[message]
)
.. class:: MHMessage(
message=None
)
A message with MH-specific behaviors. Parameter *message* has the same meaning
A message with MH-specific behaviors. Parameter *message* has the same meaning
as with the :class:`Message` constructor.
as with the :class:`Message` constructor.
...
@@ -1184,7 +1181,7 @@ When an :class:`MHMessage` instance is created based upon a
...
@@ -1184,7 +1181,7 @@ When an :class:`MHMessage` instance is created based upon a
^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^
.. class:: BabylMessage(
[message]
)
.. class:: BabylMessage(
message=None
)
A message with Babyl-specific behaviors. Parameter *message* has the same
A message with Babyl-specific behaviors. Parameter *message* has the same
meaning as with the :class:`Message` constructor.
meaning as with the :class:`Message` constructor.
...
@@ -1312,7 +1309,7 @@ When a :class:`BabylMessage` instance is created based upon an
...
@@ -1312,7 +1309,7 @@ When a :class:`BabylMessage` instance is created based upon an
^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^
.. class:: MMDFMessage(
[message]
)
.. class:: MMDFMessage(
message=None
)
A message with MMDF-specific behaviors. Parameter *message* has the same meaning
A message with MMDF-specific behaviors. Parameter *message* has the same meaning
as with the :class:`Message` constructor.
as with the :class:`Message` constructor.
...
@@ -1354,7 +1351,7 @@ When a :class:`BabylMessage` instance is created based upon an
...
@@ -1354,7 +1351,7 @@ When a :class:`BabylMessage` instance is created based upon an
are excluded.
are excluded.
.. method:: set_from(from_
[, time_=None]
)
.. method:: set_from(from_
, time_=None
)
Set the "From " line to *from_*, which should be specified without a
Set the "From " line to *from_*, which should be specified without a
leading "From " or trailing newline. For convenience, *time_* may be
leading "From " or trailing newline. For convenience, *time_* may be
...
...
Doc/library/mailcap.rst
View file @
cd7f32b6
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
:synopsis: Mailcap file handling.
:synopsis: Mailcap file handling.
Mailcap files are used to configure how MIME-aware applications such as mail
Mailcap files are used to configure how MIME-aware applications such as mail
readers and Web browsers react to files with different MIME types. (The name
readers and Web browsers react to files with different MIME types. (The name
"mailcap" is derived from the phrase "mail capability".) For example, a mailcap
"mailcap" is derived from the phrase "mail capability".) For example, a mailcap
...
@@ -20,7 +19,7 @@ Mechanism For Multimedia Mail Format Information," but is not an Internet
...
@@ -20,7 +19,7 @@ Mechanism For Multimedia Mail Format Information," but is not an Internet
standard. However, mailcap files are supported on most Unix systems.
standard. However, mailcap files are supported on most Unix systems.
.. function:: findmatch(caps, MIMEtype
[, key[, filename[, plist]]
])
.. function:: findmatch(caps, MIMEtype
, key='view', filename='/dev/null', plist=[
])
Return a 2-tuple; the first element is a string containing the command line to
Return a 2-tuple; the first element is a string containing the command line to
be executed (which can be passed to :func:`os.system`), and the second element
be executed (which can be passed to :func:`os.system`), and the second element
...
...
Doc/library/markup.rst
View file @
cd7f32b6
.. _markup:
.. _markup:
**********************************
**********************************
...
...
Doc/library/marshal.rst
View file @
cd7f32b6
:mod:`marshal` --- Internal Python object serialization
:mod:`marshal` --- Internal Python object serialization
=======================================================
=======================================================
...
...
Doc/library/math.rst
View file @
cd7f32b6
:mod:`math` --- Mathematical functions
:mod:`math` --- Mathematical functions
======================================
======================================
...
...
Doc/library/mimetypes.rst
View file @
cd7f32b6
:mod:`mimetypes` --- Map filenames to MIME types
:mod:`mimetypes` --- Map filenames to MIME types
================================================
================================================
...
@@ -23,7 +22,7 @@ the module has not been initialized, they will call :func:`init` if they rely on
...
@@ -23,7 +22,7 @@ the module has not been initialized, they will call :func:`init` if they rely on
the information :func:`init` sets up.
the information :func:`init` sets up.
.. function:: guess_type(
filename[, strict]
)
.. function:: guess_type(
url, strict=True
)
.. index:: pair: MIME; headers
.. index:: pair: MIME; headers
...
@@ -47,7 +46,7 @@ the information :func:`init` sets up.
...
@@ -47,7 +46,7 @@ the information :func:`init` sets up.
are also recognized.
are also recognized.
.. function:: guess_all_extensions(type
[, strict]
)
.. function:: guess_all_extensions(type
, strict=True
)
Guess the extensions for a file based on its MIME type, given by *type*. The
Guess the extensions for a file based on its MIME type, given by *type*. The
return value is a list of strings giving all possible filename extensions,
return value is a list of strings giving all possible filename extensions,
...
@@ -58,7 +57,7 @@ the information :func:`init` sets up.
...
@@ -58,7 +57,7 @@ the information :func:`init` sets up.
Optional *strict* has the same meaning as with the :func:`guess_type` function.
Optional *strict* has the same meaning as with the :func:`guess_type` function.
.. function:: guess_extension(type
[, strict]
)
.. function:: guess_extension(type
, strict=True
)
Guess the extension for a file based on its MIME type, given by *type*. The
Guess the extension for a file based on its MIME type, given by *type*. The
return value is a string giving a filename extension, including the leading dot
return value is a string giving a filename extension, including the leading dot
...
@@ -73,7 +72,7 @@ Some additional functions and data items are available for controlling the
...
@@ -73,7 +72,7 @@ Some additional functions and data items are available for controlling the
behavior of the module.
behavior of the module.
.. function:: init(
[files]
)
.. function:: init(
files=None
)
Initialize the internal data structures. If given, *files* must be a sequence
Initialize the internal data structures. If given, *files* must be a sequence
of file names which should be used to augment the default type map. If omitted,
of file names which should be used to augment the default type map. If omitted,
...
@@ -90,7 +89,7 @@ behavior of the module.
...
@@ -90,7 +89,7 @@ behavior of the module.
does not exist or cannot be read, ``None`` is returned.
does not exist or cannot be read, ``None`` is returned.
.. function:: add_type(type, ext
[, strict]
)
.. function:: add_type(type, ext
, strict=True
)
Add a mapping from the mimetype *type* to the extension *ext*. When the
Add a mapping from the mimetype *type* to the extension *ext*. When the
extension is already known, the new type will replace the old one. When the type
extension is already known, the new type will replace the old one. When the type
...
@@ -142,7 +141,7 @@ The :class:`MimeTypes` class may be useful for applications which may want more
...
@@ -142,7 +141,7 @@ The :class:`MimeTypes` class may be useful for applications which may want more
than one MIME-type database:
than one MIME-type database:
.. class:: MimeTypes(
[filenames]
)
.. class:: MimeTypes(
filenames=(), strict=True
)
This class represents a MIME-types database. By default, it provides access to
This class represents a MIME-types database. By default, it provides access to
the same database as the rest of this module. The initial database is a copy of
the same database as the rest of this module. The initial database is a copy of
...
@@ -206,13 +205,13 @@ MimeTypes Objects
...
@@ -206,13 +205,13 @@ MimeTypes Objects
module.
module.
.. method:: MimeTypes.guess_extension(type
[, strict]
)
.. method:: MimeTypes.guess_extension(type
, strict=True
)
Similar to the :func:`guess_extension` function, using the tables stored as part
Similar to the :func:`guess_extension` function, using the tables stored as part
of the object.
of the object.
.. method:: MimeTypes.guess_type(url
[, strict]
)
.. method:: MimeTypes.guess_type(url
, strict=True
)
Similar to the :func:`guess_type` function, using the tables stored as part of
Similar to the :func:`guess_type` function, using the tables stored as part of
the object.
the object.
...
...
Doc/library/misc.rst
View file @
cd7f32b6
.. _misc:
.. _misc:
**********************
**********************
...
...
Doc/library/mm.rst
View file @
cd7f32b6
.. _mmedia:
.. _mmedia:
*******************
*******************
...
...
Doc/library/mmap.rst
View file @
cd7f32b6
:mod:`mmap` --- Memory-mapped file support
:mod:`mmap` --- Memory-mapped file support
==========================================
==========================================
...
@@ -37,7 +36,7 @@ memory but does not update the underlying file.
...
@@ -37,7 +36,7 @@ memory but does not update the underlying file.
To map anonymous memory, -1 should be passed as the fileno along with the length.
To map anonymous memory, -1 should be passed as the fileno along with the length.
.. class:: mmap(fileno, length
[, tagname[, access[, offset]]
])
.. class:: mmap(fileno, length
, tagname=None, access=ACCESS_DEFAULT[, offset
])
**(Windows version)** Maps *length* bytes from the file specified by the
**(Windows version)** Maps *length* bytes from the file specified by the
file handle *fileno*, and creates a mmap object. If *length* is larger
file handle *fileno*, and creates a mmap object. If *length* is larger
...
@@ -59,7 +58,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
...
@@ -59,7 +58,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
defaults to 0. *offset* must be a multiple of the ALLOCATIONGRANULARITY.
defaults to 0. *offset* must be a multiple of the ALLOCATIONGRANULARITY.
.. class:: mmap(fileno, length
[, flags[, prot[, access[, offset]]]
])
.. class:: mmap(fileno, length
, flags=MAP_SHARED, prot=PROT_WRITE|PROT_READ, access=ACCESS_DEFAULT[, offset
])
:noindex:
:noindex:
**(Unix version)** Maps *length* bytes from the file specified by the file
**(Unix version)** Maps *length* bytes from the file specified by the file
...
@@ -148,7 +147,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
...
@@ -148,7 +147,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
Returns ``-1`` on failure.
Returns ``-1`` on failure.
.. method:: flush([offset
, size
])
.. method:: flush([offset
[, size]
])
Flushes changes made to the in-memory copy of a file back to disk. Without
Flushes changes made to the in-memory copy of a file back to disk. Without
use of this call there is no guarantee that changes are written back before
use of this call there is no guarantee that changes are written back before
...
...
Doc/library/modulefinder.rst
View file @
cd7f32b6
:
mod
:`
modulefinder
`
---
Find
modules
used
by
a
script
:
mod
:`
modulefinder
`
---
Find
modules
used
by
a
script
=====================================================
=====================================================
...
@@ -27,7 +26,7 @@ report of the imported modules will be printed.
...
@@ -27,7 +26,7 @@ report of the imported modules will be printed.
package
replaces
the
:
mod
:`
xml
`
package
.
package
replaces
the
:
mod
:`
xml
`
package
.
..
class
::
ModuleFinder
(
[
path
=
None
,
debug
=
0
,
excludes
=[],
replace_paths
=[]
])
..
class
::
ModuleFinder
(
path
=
None
,
debug
=
0
,
excludes
=[],
replace_paths
=[
])
This
class
provides
:
meth
:`
run_script
`
and
:
meth
:`
report
`
methods
to
determine
This
class
provides
:
meth
:`
run_script
`
and
:
meth
:`
report
`
methods
to
determine
the
set
of
modules
imported
by
a
script
.
*
path
*
can
be
a
list
of
directories
to
the
set
of
modules
imported
by
a
script
.
*
path
*
can
be
a
list
of
directories
to
...
...
Doc/library/modules.rst
View file @
cd7f32b6
.. _modules:
.. _modules:
*****************
*****************
...
...
Doc/library/msilib.rst
View file @
cd7f32b6
...
@@ -363,7 +363,7 @@ Directory Objects
...
@@ -363,7 +363,7 @@ Directory Objects
the
default
flags
that
new
components
get
.
the
default
flags
that
new
components
get
.
..
method
::
start_component
(
[
component
[,
feature
[,
flags
[,
keyfile
[,
uuid
]]]]]
)
..
method
::
start_component
(
component
=
None
,
feature
=
None
,
flags
=
None
,
keyfile
=
None
,
uuid
=
None
)
Add
an
entry
to
the
Component
table
,
and
make
this
component
the
current
Add
an
entry
to
the
Component
table
,
and
make
this
component
the
current
component
for
this
directory
.
If
no
component
name
is
given
,
the
directory
component
for
this
directory
.
If
no
component
name
is
given
,
the
directory
...
@@ -372,7 +372,7 @@ Directory Objects
...
@@ -372,7 +372,7 @@ Directory Objects
is given, the KeyPath is left null in the Component table.
is given, the KeyPath is left null in the Component table.
.. method:: add_file(file
[, src[, version[, language]]]
)
.. method:: add_file(file
, src=None, version=None, language=None
)
Add a file to the current component of the directory, starting a new one
Add a file to the current component of the directory, starting a new one
if there is no current component. By default, the file name in the source
if there is no current component. By default, the file name in the source
...
@@ -381,7 +381,7 @@ Directory Objects
...
@@ -381,7 +381,7 @@ Directory Objects
and a *language* can be specified for the entry in the File table.
and a *language* can be specified for the entry in the File table.
.. method:: glob(pattern
[, exclude]
)
.. method:: glob(pattern
, exclude=None
)
Add a list of files to the current component as specified in the glob
Add a list of files to the current component as specified in the glob
pattern. Individual files can be excluded in the *exclude* list.
pattern. Individual files can be excluded in the *exclude* list.
...
@@ -405,7 +405,7 @@ Features
...
@@ -405,7 +405,7 @@ Features
--------
--------
.. class:: Feature(d
atabase, id, title, desc, display[, level=1[, parent[, directory[, attributes=0]]]]
)
.. class:: Feature(d
b, id, title, desc, display, level=1, parent=None, directory=None, attributes=0
)
Add a new record to the ``Feature`` table, using the values *id*, *parent.id*,
Add a new record to the ``Feature`` table, using the values *id*, *parent.id*,
*title*, *desc*, *display*, *level*, *directory*, and *attributes*. The
*title*, *desc*, *display*, *level*, *directory*, and *attributes*. The
...
@@ -440,7 +440,7 @@ to create MSI files with a user-interface for installing Python packages.
...
@@ -440,7 +440,7 @@ to create MSI files with a user-interface for installing Python packages.
belongs to, and *name* is the control'
s
name
.
belongs to, and *name* is the control'
s
name
.
..
method
::
event
(
event
,
argument
[,
condition
=
1
[,
ordering
]]
)
..
method
::
event
(
event
,
argument
,
condition
=
1
,
ordering
=
None
)
Make
an
entry
into
the
``
ControlEvent
``
table
for
this
control
.
Make
an
entry
into
the
``
ControlEvent
``
table
for
this
control
.
...
@@ -461,10 +461,10 @@ to create MSI files with a user-interface for installing Python packages.
...
@@ -461,10 +461,10 @@ to create MSI files with a user-interface for installing Python packages.
that
gets
set
when
a
radio
button
is
selected
.
that
gets
set
when
a
radio
button
is
selected
.
..
method
::
add
(
name
,
x
,
y
,
width
,
height
,
text
[,
value
]
)
..
method
::
add
(
name
,
x
,
y
,
width
,
height
,
text
,
value
=
None
)
Add
a
radio
button
named
*
name
*
to
the
group
,
at
the
coordinates
*
x
*,
*
y
*,
Add
a
radio
button
named
*
name
*
to
the
group
,
at
the
coordinates
*
x
*,
*
y
*,
*
width
*,
*
height
*,
and
with
the
label
*
text
*.
If
*
value
*
is
omitted
,
it
*
width
*,
*
height
*,
and
with
the
label
*
text
*.
If
*
value
*
is
``
None
``
,
it
defaults
to
*
name
*.
defaults
to
*
name
*.
...
...
Doc/library/msvcrt.rst
View file @
cd7f32b6
:mod:`msvcrt` -- Useful routines from the MS VC++ runtime
:mod:`msvcrt` -- Useful routines from the MS VC++ runtime
=========================================================
=========================================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment