diff options
Diffstat (limited to 'Doc/library/token.rst')
-rw-r--r-- | Doc/library/token.rst | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/Doc/library/token.rst b/Doc/library/token.rst index 24455b1ef77..c228006d4c1 100644 --- a/Doc/library/token.rst +++ b/Doc/library/token.rst @@ -51,7 +51,7 @@ The token constants are: .. data:: NAME Token value that indicates an :ref:`identifier <identifiers>`. - Note that keywords are also initially tokenized an ``NAME`` tokens. + Note that keywords are also initially tokenized as ``NAME`` tokens. .. data:: NUMBER @@ -131,6 +131,41 @@ The token constants are: The token string contains the closing quote(s). +.. data:: TSTRING_START + + Token value used to indicate the beginning of a template string literal. + + .. impl-detail:: + + The token string includes the prefix and the opening quote(s), but none + of the contents of the literal. + + .. versionadded:: 3.14 + +.. data:: TSTRING_MIDDLE + + Token value used for literal text inside a template string literal + including format specifications. + + .. impl-detail:: + + Replacement fields (that is, the non-literal parts of t-strings) use + the same tokens as other expressions, and are delimited by + :data:`LBRACE`, :data:`RBRACE`, :data:`EXCLAMATION` and :data:`COLON` + tokens. + + .. versionadded:: 3.14 + +.. data:: TSTRING_END + + Token value used to indicate the end of a template string literal. + + .. impl-detail:: + + The token string contains the closing quote(s). + + .. versionadded:: 3.14 + .. data:: ENDMARKER Token value that indicates the end of input. |