summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAlbert-Jan Nijburg <albertjan@trinket.io>2017-05-31 14:00:21 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-05-31 14:00:21 (GMT)
commitfc354f07855a9197e71f851ad930cbf5652f9160 (patch)
tree5c7c6ad2a4de72993d916c321156572d4fa4635d /Doc
parent85aba238e49abd2d5a604102981d28a50f305443 (diff)
downloadcpython-fc354f07855a9197e71f851ad930cbf5652f9160.zip
cpython-fc354f07855a9197e71f851ad930cbf5652f9160.tar.gz
cpython-fc354f07855a9197e71f851ad930cbf5652f9160.tar.bz2
bpo-25324: copy tok_name before changing it (#1608)
* add test to check if were modifying token * copy list so import tokenize doesnt have side effects on token * shorten line * add tokenize tokens to token.h to get them to show up in token * move ERRORTOKEN back to its previous location, and fix nitpick * copy comments from token.h automatically * fix whitespace and make more pythonic * change to fix comments from @haypo * update token.rst and Misc/NEWS * change wording * some more wording changes
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/token.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/token.rst b/Doc/library/token.rst
index effb711..4bf15d5 100644
--- a/Doc/library/token.rst
+++ b/Doc/library/token.rst
@@ -101,6 +101,9 @@ The token constants are:
AWAIT
ASYNC
ERRORTOKEN
+ COMMENT
+ NL
+ ENCODING
N_TOKENS
NT_OFFSET
@@ -108,3 +111,8 @@ The token constants are:
Added :data:`AWAIT` and :data:`ASYNC` tokens. Starting with
Python 3.7, "async" and "await" will be tokenized as :data:`NAME`
tokens, and :data:`AWAIT` and :data:`ASYNC` will be removed.
+
+ .. versionchanged:: 3.7
+ Added :data:`COMMENT`, :data:`NL` and :data:`ENCODING` to bring
+ the tokens in the C code in line with the tokens needed in
+ :mod:`tokenize` module. These tokens aren't used by the C tokenizer. \ No newline at end of file