Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/library/mailbox.rst

    r2 r391  
    1212accessing and manipulating on-disk mailboxes and the messages they contain.
    1313:class:`Mailbox` offers a dictionary-like mapping from keys to messages.
    14 :class:`Message` extends the :mod:`email.Message` module's :class:`Message`
    15 class with format-specific state and behavior. Supported mailbox formats are
     14:class:`Message` extends the :mod:`email.message` module's
     15:class:`~email.message.Message` class with format-specific state and behavior.
     16Supported mailbox formats are
    1617Maildir, mbox, MH, Babyl, and MMDF.
    1718
     
    8485
    8586      Parameter *message* may be a :class:`Message` instance, an
    86       :class:`email.Message.Message` instance, a string, or a file-like object
     87      :class:`email.message.Message` instance, a string, or a file-like object
    8788      (which should be open in text mode). If *message* is an instance of the
    8889      appropriate format-specific :class:`Message` subclass (e.g., if it's an
     
    111112
    112113      As with :meth:`add`, parameter *message* may be a :class:`Message`
    113       instance, an :class:`email.Message.Message` instance, a string, or a
     114      instance, an :class:`email.message.Message` instance, a string, or a
    114115      file-like object (which should be open in text mode). If *message* is an
    115116      instance of the appropriate format-specific :class:`Message` subclass
     
    155156
    156157
    157    .. method:: get(key[, default=None])
     158   .. method:: get(key, default=None)
    158159               __getitem__(key)
    159160
     
    279280
    280281
    281 .. class:: Maildir(dirname[, factory=rfc822.Message[, create=True]])
     282.. class:: Maildir(dirname, factory=rfc822.Message, create=True)
    282283
    283284   A subclass of :class:`Mailbox` for mailboxes in Maildir format. Parameter
     
    424425
    425426
    426 .. class:: mbox(path[, factory=None[, create=True]])
     427.. class:: mbox(path, factory=None, create=True)
    427428
    428429   A subclass of :class:`Mailbox` for mailboxes in mbox format. Parameter *factory*
     
    460461
    461462      Three locking mechanisms are used---dot locking and, if available, the
    462       :cfunc:`flock` and :cfunc:`lockf` system calls.
     463      :c:func:`flock` and :c:func:`lockf` system calls.
    463464
    464465
     
    484485
    485486
    486 .. class:: MH(path[, factory=None[, create=True]])
     487.. class:: MH(path, factory=None, create=True)
    487488
    488489   A subclass of :class:`Mailbox` for mailboxes in MH format. Parameter *factory*
     
    574575
    575576      Three locking mechanisms are used---dot locking and, if available, the
    576       :cfunc:`flock` and :cfunc:`lockf` system calls. For MH mailboxes, locking
     577      :c:func:`flock` and :c:func:`lockf` system calls. For MH mailboxes, locking
    577578      the mailbox means locking the :file:`.mh_sequences` file and, only for the
    578579      duration of any operations that affect them, locking individual message
     
    614615
    615616
    616 .. class:: Babyl(path[, factory=None[, create=True]])
     617.. class:: Babyl(path, factory=None, create=True)
    617618
    618619   A subclass of :class:`Mailbox` for mailboxes in Babyl format. Parameter
     
    661662      In Babyl mailboxes, the headers of a message are not stored contiguously
    662663      with the body of the message. To generate a file-like representation, the
    663       headers and body are copied together into a :class:`StringIO` instance
     664      headers and body are copied together into a :class:`~StringIO.StringIO` instance
    664665      (from the :mod:`StringIO` module), which has an API identical to that of a
    665666      file. As a result, the file-like object is truly independent of the
     
    672673
    673674      Three locking mechanisms are used---dot locking and, if available, the
    674       :cfunc:`flock` and :cfunc:`lockf` system calls.
     675      :c:func:`flock` and :c:func:`lockf` system calls.
    675676
    676677
     
    690691
    691692
    692 .. class:: MMDF(path[, factory=None[, create=True]])
     693.. class:: MMDF(path, factory=None, create=True)
    693694
    694695   A subclass of :class:`Mailbox` for mailboxes in MMDF format. Parameter *factory*
     
    723724
    724725      Three locking mechanisms are used---dot locking and, if available, the
    725       :cfunc:`flock` and :cfunc:`lockf` system calls.
     726      :c:func:`flock` and :c:func:`lockf` system calls.
    726727
    727728
     
    744745.. class:: Message([message])
    745746
    746    A subclass of the :mod:`email.Message` module's :class:`Message`. Subclasses of
    747    :class:`mailbox.Message` add mailbox-format-specific state and behavior.
     747   A subclass of the :mod:`email.message` module's
     748   :class:`~email.message.Message`. Subclasses of :class:`mailbox.Message` add
     749   mailbox-format-specific state and behavior.
    748750
    749751   If *message* is omitted, the new instance is created in a default, empty state.
    750    If *message* is an :class:`email.Message.Message` instance, its contents are
     752   If *message* is an :class:`email.message.Message` instance, its contents are
    751753   copied; furthermore, any format-specific information is converted insofar as
    752754   possible if *message* is a :class:`Message` instance. If *message* is a string
     
    766768   messages retrieved using :class:`Mailbox` instances. In some situations, the
    767769   time and memory required to generate :class:`Message` representations might
    768    not not acceptable. For such situations, :class:`Mailbox` instances also
     770   not be acceptable. For such situations, :class:`Mailbox` instances also
    769771   offer string and file-like representations, and a custom message factory may
    770772   be specified when a :class:`Mailbox` instance is initialized.
     
    988990
    989991
    990    .. method:: set_from(from_[, time_=None])
     992   .. method:: set_from(from_, time_=None)
    991993
    992994      Set the "From " line to *from_*, which should be specified without a
    993995      leading "From " or trailing newline. For convenience, *time_* may be
    994996      specified and will be formatted appropriately and appended to *from_*. If
    995       *time_* is specified, it should be a :class:`struct_time` instance, a
     997      *time_* is specified, it should be a :class:`time.struct_time` instance, a
    996998      tuple suitable for passing to :meth:`time.strftime`, or ``True`` (to use
    997999      :meth:`time.gmtime`).
     
    12521254      Set the message's visible headers to be the same as the headers in
    12531255      *message*.  Parameter *visible* should be a :class:`Message` instance, an
    1254       :class:`email.Message.Message` instance, a string, or a file-like object
     1256      :class:`email.message.Message` instance, a string, or a file-like object
    12551257      (which should be open in text mode).
    12561258
     
    13591361
    13601362
    1361    .. method:: set_from(from_[, time_=None])
     1363   .. method:: set_from(from_, time_=None)
    13621364
    13631365      Set the "From " line to *from_*, which should be specified without a
    13641366      leading "From " or trailing newline. For convenience, *time_* may be
    13651367      specified and will be formatted appropriately and appended to *from_*. If
    1366       *time_* is specified, it should be a :class:`struct_time` instance, a
     1368      *time_* is specified, it should be a :class:`time.struct_time` instance, a
    13671369      tuple suitable for passing to :meth:`time.strftime`, or ``True`` (to use
    13681370      :meth:`time.gmtime`).
     
    15141516represent format-specific message properties. For backward compatibility, the
    15151517older mailbox classes are still available, but the newer classes should be used
    1516 in preference to them.  The old classes will be removed in Python 3.0.
     1518in preference to them.  The old classes have been removed in Python 3.
    15171519
    15181520Older mailbox objects support only iteration and provide a single public method:
Note: See TracChangeset for help on using the changeset viewer.