@@ -443,7 +443,7 @@ instance of the :class:`bytes` type instead of the :class:`str` type. They
443443may only contain ASCII characters; bytes with a numeric value of 128 or greater
444444must be expressed with escapes.
445445
446- As of Python 3.3 it is possible again to prefix unicode strings with a
446+ As of Python 3.3 it is possible again to prefix string literals with a
447447``u `` prefix to simplify maintenance of dual 2.x and 3.x codebases.
448448
449449Both string and bytes literals may optionally be prefixed with a letter ``'r' ``
@@ -453,24 +453,24 @@ escapes in raw strings are not treated specially. Given that Python 2.x's raw
453453unicode literals behave differently than Python 3.x's the ``'ur' `` syntax
454454is not supported.
455455
456- .. versionadded :: 3.3
457- The ``'rb' `` prefix of raw bytes literals has been added as a synonym
458- of ``'br' ``.
456+ .. versionadded :: 3.3
457+ The ``'rb' `` prefix of raw bytes literals has been added as a synonym
458+ of ``'br' ``.
459459
460- .. versionadded :: 3.3
461- Support for the unicode legacy literal (``u'value' ``) was reintroduced
462- to simplify the maintenance of dual Python 2.x and 3.x codebases.
463- See :pep: `414 ` for more information.
460+ .. versionadded :: 3.3
461+ Support for the unicode legacy literal (``u'value' ``) was reintroduced
462+ to simplify the maintenance of dual Python 2.x and 3.x codebases.
463+ See :pep: `414 ` for more information.
464464
465- In triple-quoted strings , unescaped newlines and quotes are allowed (and are
466- retained), except that three unescaped quotes in a row terminate the string . (A
467- "quote" is the character used to open the string , i.e. either ``' `` or ``" ``.)
465+ In triple-quoted literals , unescaped newlines and quotes are allowed (and are
466+ retained), except that three unescaped quotes in a row terminate the literal . (A
467+ "quote" is the character used to open the literal , i.e. either ``' `` or ``" ``.)
468468
469469.. index :: physical line, escape sequence, Standard C, C
470470
471- Unless an ``'r' `` or ``'R' `` prefix is present, escape sequences in strings are
472- interpreted according to rules similar to those used by Standard C. The
473- recognized escape sequences are:
471+ Unless an ``'r' `` or ``'R' `` prefix is present, escape sequences in string and
472+ bytes literals are interpreted according to rules similar to those used by
473+ Standard C. The recognized escape sequences are:
474474
475475+-----------------+---------------------------------+-------+
476476| Escape Sequence | Meaning | Notes |
@@ -547,20 +547,20 @@ Notes:
547547.. index :: unrecognized escape sequence
548548
549549Unlike Standard C, all unrecognized escape sequences are left in the string
550- unchanged, i.e., *the backslash is left in the string *. (This behavior is
550+ unchanged, i.e., *the backslash is left in the result *. (This behavior is
551551useful when debugging: if an escape sequence is mistyped, the resulting output
552552is more easily recognized as broken.) It is also important to note that the
553553escape sequences only recognized in string literals fall into the category of
554554unrecognized escapes for bytes literals.
555555
556- Even in a raw string, string quotes can be escaped with a backslash, but the
557- backslash remains in the string ; for example, ``r"\"" `` is a valid string
556+ Even in a raw literal, quotes can be escaped with a backslash, but the
557+ backslash remains in the result ; for example, ``r"\"" `` is a valid string
558558literal consisting of two characters: a backslash and a double quote; ``r"\" ``
559559is not a valid string literal (even a raw string cannot end in an odd number of
560- backslashes). Specifically, *a raw string cannot end in a single backslash *
560+ backslashes). Specifically, *a raw literal cannot end in a single backslash *
561561(since the backslash would escape the following quote character). Note also
562562that a single backslash followed by a newline is interpreted as those two
563- characters as part of the string , *not * as a line continuation.
563+ characters as part of the literal , *not * as a line continuation.
564564
565565
566566.. _string-catenation :
0 commit comments