mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
document TokenError and unclosed expression behavior (closes #12063)
Patch by Amandine Lee.
This commit is contained in:
parent
ed1160b39c
commit
96e0430dfb
2 changed files with 19 additions and 0 deletions
|
|
@ -131,6 +131,24 @@ function it uses to do this is available:
|
||||||
|
|
||||||
.. versionadded:: 3.2
|
.. versionadded:: 3.2
|
||||||
|
|
||||||
|
.. exception:: TokenError
|
||||||
|
|
||||||
|
Raised when either a docstring or expression that may be split over several
|
||||||
|
lines is not completed anywhere in the file, for example::
|
||||||
|
|
||||||
|
"""Beginning of
|
||||||
|
docstring
|
||||||
|
|
||||||
|
or::
|
||||||
|
|
||||||
|
[1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
|
||||||
|
Note that unclosed single-quoted strings do not cause an error to be
|
||||||
|
raised. They are tokenized as ``ERRORTOKEN``, followed by the tokenization of
|
||||||
|
their contents.
|
||||||
|
|
||||||
|
|
||||||
.. _tokenize-cli:
|
.. _tokenize-cli:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -749,6 +749,7 @@ Julia Lawall
|
||||||
Chris Lawrence
|
Chris Lawrence
|
||||||
Brian Leair
|
Brian Leair
|
||||||
Mathieu Leduc-Hamel
|
Mathieu Leduc-Hamel
|
||||||
|
Amandine Lee
|
||||||
Antony Lee
|
Antony Lee
|
||||||
Christopher Lee
|
Christopher Lee
|
||||||
Inyeol Lee
|
Inyeol Lee
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue