summaryrefslogtreecommitdiff
path: root/sphinx/pycode/pgen2/tokenize.py
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2014-01-22 18:34:51 +0400
committerDmitry Shachnev <mitya57@gmail.com>2014-01-22 18:34:51 +0400
commit953b33d3f721e58ab48490d33c141df1e4dd25c1 (patch)
tree26bce4c2ef75b4ebe8422685d8962aa07978bad2 /sphinx/pycode/pgen2/tokenize.py
parent317930a7fbd49b50fb8a144161a698fcafeab91a (diff)
parent5f13479408785818ee8b85d4172314ea5578fde3 (diff)
downloadsphinx-git-953b33d3f721e58ab48490d33c141df1e4dd25c1.tar.gz
Merge
Diffstat (limited to 'sphinx/pycode/pgen2/tokenize.py')
-rw-r--r--sphinx/pycode/pgen2/tokenize.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/pycode/pgen2/tokenize.py b/sphinx/pycode/pgen2/tokenize.py
index 7ad9f012c..93fd6578f 100644
--- a/sphinx/pycode/pgen2/tokenize.py
+++ b/sphinx/pycode/pgen2/tokenize.py
@@ -25,6 +25,8 @@ are the same, except instead of generating tokens, tokeneater is a callback
function to which the 5 fields described above are passed as 5 arguments,
each time a new token is found."""
+from __future__ import print_function
+
__author__ = 'Ka-Ping Yee <ping@lfw.org>'
__credits__ = \
'GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, Skip Montanaro'
@@ -146,8 +148,8 @@ class StopTokenizing(Exception): pass
def printtoken(type, token, scell, ecell, line): # for testing
srow, scol = scell
erow, ecol = ecell
- print "%d,%d-%d,%d:\t%s\t%s" % \
- (srow, scol, erow, ecol, tok_name[type], repr(token))
+ print("%d,%d-%d,%d:\t%s\t%s" %
+ (srow, scol, erow, ecol, tok_name[type], repr(token)))
def tokenize(readline, tokeneater=printtoken):
"""