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

Side by Side Diff: Doc/library/html.entities.rst

Issue 11113: html.entities mapping dicts need updating?
Patch Set: Created 6 years, 12 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:
View unified diff | Download patch
« no previous file with comments | « no previous file | Lib/html/entities.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 three dictionaries, ``name2codepoint``, ``codepoint2name``, 12 This module defines four dictionaries, :data:`html5`,
13 and ``entitydefs``. ``entitydefs`` is used to provide the :attr:`entitydefs` 13 :data:`name2codepoint`, :data:`codepoint2name`, and :data:`entitydefs`.
14 :data:`entitydefs` is used to provide the :attr:`entitydefs`
14 attribute of the :class:`html.parser.HTMLParser` class. The definition provided 15 attribute of the :class:`html.parser.HTMLParser` class. The definition provided
15 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
16 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).
17 18
18 19
20 .. data:: html5
21
22 A dictionary that maps HTML5 named character references [#]_ to the
23 equivalent Unicode character(s), e.g. ``html5['gt;'] == '>'``.
24
25 .. versionadded:: 3.3
26
27
19 .. data:: entitydefs 28 .. data:: entitydefs
20 29
21 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
22 ISO Latin-1. 31 ISO Latin-1.
23 32
24 33
25 .. data:: name2codepoint 34 .. data:: name2codepoint
26 35
27 A dictionary that maps HTML entity names to the Unicode codepoints. 36 A dictionary that maps HTML entity names to the Unicode codepoints.
28 37
29 38
30 .. data:: codepoint2name 39 .. data:: codepoint2name
31 40
32 A dictionary that maps Unicode codepoints to HTML entity names. 41 A dictionary that maps Unicode codepoints to HTML entity names.
42
43
44 .. rubric:: Footnotes
45
46 .. [#] See http://www.w3.org/TR/html5/named-character-references.html
OLDNEW
« no previous file with comments | « no previous file | Lib/html/entities.py » ('j') | no next file with comments »

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