@@ -53,7 +53,9 @@ end-of-line sequences:
5353
5454* the Unix form using ASCII LF (linefeed),
5555* the Windows form using the ASCII sequence CR LF (return followed by linefeed),
56- * the old Macintosh form using the ASCII CR (return) character.
56+ * the '`Classic Mac OS `__' form using the ASCII CR (return) character.
57+
58+ __ https://en.wikipedia.org/wiki/Classic_Mac_OS
5759
5860Regardless of platform, each of these sequences is replaced by a single
5961ASCII LF (linefeed) character.
@@ -499,7 +501,7 @@ Literals are notations for constant values of some built-in types.
499501In terms of lexical analysis, Python has :ref: `string, bytes <strings >`
500502and :ref: `numeric <numbers >` literals.
501503
502- Other “ literals” are lexically denoted using :ref: `keywords <keywords >`
504+ Other " literals" are lexically denoted using :ref: `keywords <keywords >`
503505(``None ``, ``True ``, ``False ``) and the special
504506:ref: `ellipsis token <lexical-ellipsis >` (``... ``).
505507
@@ -538,7 +540,7 @@ after the backslash.
538540For example, ``\" `` denotes the double quote character, and does *not * end
539541the string:
540542
541- .. code-block :: python
543+ .. code-block :: pycon
542544
543545 >>> print("Say \"Hello\" to everyone!")
544546 Say "Hello" to everyone!
@@ -613,8 +615,8 @@ The ``r`` prefix can be combined with ``f``, ``t`` or ``b``, so ``fr``,
613615Formal grammar
614616--------------
615617
616- String literals, except :ref: `"F -strings" <f-strings >` and
617- :ref: `"T -strings" <t-strings >`, are described by the
618+ String literals, except :ref: `"f -strings" <f-strings >` and
619+ :ref: `"t -strings" <t-strings >`, are described by the
618620following lexical definitions.
619621
620622These definitions use :ref: `negative lookaheads <lexical-lookaheads >` (``! ``)
@@ -791,21 +793,21 @@ Named Unicode character
791793 This sequence cannot appear in :ref: `bytes literals <bytes-literal >`.
792794
793795 .. versionchanged :: 3.3
794- Support for `name aliases <https://www.unicode.org/Public/16.0.0/ucd/NameAliases.txt >`__
795- has been added.
796+ Support for `name aliases <https://www.unicode.org/Public/16.0.0/ucd/NameAliases.txt >`__
797+ has been added.
796798
797799.. _string-escape-long-hex :
798800
799801Hexadecimal Unicode characters
800802^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
801803
802- These sequences :samp: `\\ u{ xxxx } ` and :samp: `\\ U{ xxxxxxxx } ` denote the
803- Unicode character with the given hex (base 16) value.
804- Exactly four digits are required for ``\u ``; exactly eight digits are
805- required for ``\U ``.
806- The latter can encode any Unicode character.
804+ These sequences :samp: `\\ u{ xxxx } ` and :samp: `\\ U{ xxxxxxxx } ` denote the
805+ Unicode character with the given hex (base 16) value.
806+ Exactly four digits are required for ``\u ``; exactly eight digits are
807+ required for ``\U ``.
808+ The latter can encode any Unicode character.
807809
808- .. code-block :: python
810+ .. code-block :: pycon
809811
810812 >>> '\u1234'
811813 'ሴ'
@@ -856,7 +858,7 @@ They may only contain ASCII characters; bytes with a numeric value of 128
856858or greater must be expressed with escape sequences (typically
857859:ref: `string-escape-hex ` or :ref: `string-escape-oct `):
858860
859- .. code-block :: python
861+ .. code-block :: pycon
860862
861863 >>> b'\x89PNG\r\n\x1a\n'
862864 b'\x89PNG\r\n\x1a\n'
@@ -883,7 +885,7 @@ literal characters.
883885As a result, in raw string literals, :ref: `escape sequences <escape-sequences >`
884886are not treated specially:
885887
886- .. code-block :: python
888+ .. code-block :: pycon
887889
888890 >>> r'\d{4}-\d{2}-\d{2}'
889891 '\\d{4}-\\d{2}-\\d{2}'
0 commit comments