diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-20 18:32:47 +0400 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-20 18:32:47 +0400 |
commit | c2eaf2af81c1c0bce89ce8e4e43d853ac768c8f3 (patch) | |
tree | bb18c53d431f98cb3a33df663efe9093af0775ea /sphinx/pycode/pgen2/tokenize.py | |
parent | 8115aa81a2972a5cc20b8d7c244c52e792ecad98 (diff) | |
parent | ce2185ce279664e54ba22b14663091abc5a3a8f2 (diff) | |
download | sphinx-git-c2eaf2af81c1c0bce89ce8e4e43d853ac768c8f3.tar.gz |
Merge
Diffstat (limited to 'sphinx/pycode/pgen2/tokenize.py')
-rw-r--r-- | sphinx/pycode/pgen2/tokenize.py | 6 |
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): """ |