Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(33)

Delta Between Two Patch Sets: Doc/library/email.headerregistry.rst

Issue 18761: Fix internal doc references for the email package (Closed)
Left Patch Set: Created 6 years, 9 months ago
Right Patch Set: Created 6 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Doc/library/email.errors.rst ('k') | Doc/library/email.iterators.rst » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 :mod:`email.headerregistry`: Custom Header Objects 1 :mod:`email.headerregistry`: Custom Header Objects
2 -------------------------------------------------- 2 --------------------------------------------------
3 3
4 .. module:: email.headerregistry 4 .. module:: email.headerregistry
5 :synopsis: Automatic Parsing of headers based on the field name 5 :synopsis: Automatic Parsing of headers based on the field name
6 6
7 .. moduleauthor:: R. David Murray <rdmurray@bitdance.com> 7 .. moduleauthor:: R. David Murray <rdmurray@bitdance.com>
8 .. sectionauthor:: R. David Murray <rdmurray@bitdance.com> 8 .. sectionauthor:: R. David Murray <rdmurray@bitdance.com>
9 9
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 *name* and *value* are passed to ``BaseHeader`` from the 49 *name* and *value* are passed to ``BaseHeader`` from the
50 :attr:`~email.policy.EmailPolicy.header_factory` call. The string value of 50 :attr:`~email.policy.EmailPolicy.header_factory` call. The string value of
51 any header object is the *value* fully decoded to unicode. 51 any header object is the *value* fully decoded to unicode.
52 52
53 This base class defines the following read-only properties: 53 This base class defines the following read-only properties:
54 54
55 55
56 .. attribute:: name 56 .. attribute:: name
57 57
58 The name of the header (the portion of the field before the ':'). This 58 The name of the header (the portion of the field before the ':'). This
59 is exactly the value passed in the :attr:`~email.policy.EmailPolicy.header _factory` 59 is exactly the value passed in the
60 call for *name*; that is, case is preserved. 60 :attr:`~email.policy.EmailPolicy.header_factory` call for *name*; that
61 is, case is preserved.
61 62
62 63
63 .. attribute:: defects 64 .. attribute:: defects
64 65
65 A tuple of :exc:`~email.errors.HeaderDefect` instances reporting any 66 A tuple of :exc:`~email.errors.HeaderDefect` instances reporting any
66 RFC compliance problems found during parsing. The email package tries to 67 RFC compliance problems found during parsing. The email package tries to
67 be complete about detecting compliance issues. See the :mod:`email.errors ` 68 be complete about detecting compliance issues. See the :mod:`~email.error s`
68 module for a discussion of the types of defects that may be reported. 69 module for a discussion of the types of defects that may be reported.
69 70
70 71
71 .. attribute:: max_count 72 .. attribute:: max_count
72 73
73 The maximum number of headers of this type that can have the same 74 The maximum number of headers of this type that can have the same
74 ``name``. A value of ``None`` means unlimited. The ``BaseHeader`` value 75 ``name``. A value of ``None`` means unlimited. The ``BaseHeader`` value
75 for this attribute is ``None``; it is expected that specialized header 76 for this attribute is ``None``; it is expected that specialized header
76 classes will override this value as needed. 77 classes will override this value as needed.
77 78
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 .. class:: SingleAddressHeader 224 .. class:: SingleAddressHeader
224 225
225 A subclass of :class:`.AddressHeader` that adds one 226 A subclass of :class:`.AddressHeader` that adds one
226 additional attribute: 227 additional attribute:
227 228
228 229
229 .. attribute:: address 230 .. attribute:: address
230 231
231 The single address encoded by the header value. If the header value 232 The single address encoded by the header value. If the header value
232 actually contains more than one address (which would be a violation of 233 actually contains more than one address (which would be a violation of
233 the RFC under the default :mod:`~email.policy`), accessing this attribute will 234 the RFC under the default :mod:`~email.policy`), accessing this attribute
eric.araujo 2013/08/16 23:45:03 Wouldn’t a glossary link be better than a module l
r.david.murray 2013/08/17 01:04:05 A glossary link to what? The policy module docs e
234 result in a :exc:`ValueError`. 235 will result in a :exc:`ValueError`.
235 236
236 237
237 Many of the above classes also have a ``Unique`` variant (for example, 238 Many of the above classes also have a ``Unique`` variant (for example,
238 ``UniqueUnstructuredHeader``). The only difference is that in the ``Unique`` 239 ``UniqueUnstructuredHeader``). The only difference is that in the ``Unique``
239 variant, :attr:`~.BaseHeader.max_count` is set to 1. 240 variant, :attr:`~.BaseHeader.max_count` is set to 1.
240 241
241 242
242 .. class:: MIMEVersionHeader 243 .. class:: MIMEVersionHeader
243 244
244 There is really only one valid value for the :mailheader:`MIME-Version` 245 There is really only one valid value for the :mailheader:`MIME-Version`
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 A possibly empty tuple of :class:`.Address` objects representing the 444 A possibly empty tuple of :class:`.Address` objects representing the
444 addresses in the group. 445 addresses in the group.
445 446
446 .. method:: __str__() 447 .. method:: __str__()
447 448
448 The ``str`` value of a ``Group`` is formatted according to :rfc:`5322`, 449 The ``str`` value of a ``Group`` is formatted according to :rfc:`5322`,
449 but with no Content Transfer Encoding of any non-ASCII characters. If 450 but with no Content Transfer Encoding of any non-ASCII characters. If
450 ``display_name`` is none and there is a single ``Address`` in the 451 ``display_name`` is none and there is a single ``Address`` in the
451 ``addresses`` list, the ``str`` value will be the same as the ``str`` of 452 ``addresses`` list, the ``str`` value will be the same as the ``str`` of
452 that single ``Address``. 453 that single ``Address``.
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+