Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
806f9d70
Commit
806f9d70
authored
Jun 07, 2014
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
document TokenError and unclosed expression behavior (closes #12063)
Patch by Amandine Lee.
parent
c3e1e902
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
Doc/library/tokenize.rst
Doc/library/tokenize.rst
+18
-0
Misc/ACKS
Misc/ACKS
+1
-0
No files found.
Doc/library/tokenize.rst
View file @
806f9d70
...
...
@@ -98,6 +98,24 @@ back the modified script.
.. versionadded:: 2.5
.. 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.
Example of a script re-writer that transforms float literals into Decimal
objects::
...
...
Misc/ACKS
View file @
806f9d70
...
...
@@ -750,6 +750,7 @@ Julia Lawall
Chris Lawrence
Brian Leair
Mathieu Leduc-Hamel
Amandine Lee
Christopher Lee
Inyeol Lee
James Lee
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment