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

Delta Between Two Patch Sets: Doc/library/html.entities.rst

Issue 11113: html.entities mapping dicts need updating?
Left Patch Set: Created 7 years, 5 months ago
Right Patch Set: Created 7 years, 5 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 | « no previous file | Lib/html/entities.py » ('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:`html.entities` --- Definitions of HTML general entities 1 :mod:`html.entities` --- Definitions of HTML general entities
2 ============================================================= 2 =============================================================
3 3
4 .. module:: html.entities 4 .. module:: html.entities
5 :synopsis: Definitions of HTML general entities. 5 :synopsis: Definitions of HTML general entities.
6 .. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org> 6 .. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
7 7
8 **Source code:** :source:`Lib/html/entities.py` 8 **Source code:** :source:`Lib/html/entities.py`
9 9
10 -------------- 10 --------------
11 11
12 This module defines four dictionaries, :data:`html5namedcharref`, 12 This module defines four dictionaries, :data:`html5`,
13 :data:`name2codepoint`, :data:`codepoint2name`, and :data:`entitydefs`. 13 :data:`name2codepoint`, :data:`codepoint2name`, and :data:`entitydefs`.
14 :data:`entitydefs` is used to provide the :attr:`entitydefs` 14 :data:`entitydefs` is used to provide the :attr:`entitydefs`
15 attribute of the :class:`html.parser.HTMLParser` class. The definition provided 15 attribute of the :class:`html.parser.HTMLParser` class. The definition provided
16 here contains all the entities defined by XHTML 1.0 that can be handled using 16 here contains all the entities defined by XHTML 1.0 that can be handled using
17 simple textual substitution in the Latin-1 character set (ISO-8859-1). 17 simple textual substitution in the Latin-1 character set (ISO-8859-1).
18 18
19 19
20 .. data:: html5namedcharref 20 .. data:: html5
21 21
22 A dictionary that maps HTML5 named character references [#]_ to the 22 A dictionary that maps HTML5 named character references [#]_ to the
23 equivalent Unicode character(s), e.g. ``html5namedcharref['gt;'] == '>'``. 23 equivalent Unicode character(s), e.g. ``html5['gt;'] == '>'``.
24 24
25 .. versionadded:: 3.3 25 .. versionadded:: 3.3
26 26
27 27
28 .. data:: entitydefs 28 .. data:: entitydefs
29 29
30 A dictionary mapping XHTML 1.0 entity definitions to their replacement text i n 30 A dictionary mapping XHTML 1.0 entity definitions to their replacement text i n
31 ISO Latin-1. 31 ISO Latin-1.
32 32
33 33
34 .. data:: name2codepoint 34 .. data:: name2codepoint
35 35
36 A dictionary that maps HTML entity names to the Unicode codepoints. 36 A dictionary that maps HTML entity names to the Unicode codepoints.
37 37
38 38
39 .. data:: codepoint2name 39 .. data:: codepoint2name
40 40
41 A dictionary that maps Unicode codepoints to HTML entity names. 41 A dictionary that maps Unicode codepoints to HTML entity names.
42 42
43 43
44 .. rubric:: Footnotes 44 .. rubric:: Footnotes
45 45
46 .. [#] See http://www.w3.org/TR/html5/named-character-references.html 46 .. [#] See http://www.w3.org/TR/html5/named-character-references.html
LEFTRIGHT

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