summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorDasIch <dasdasich@googlemail.com>2010-05-01 19:17:52 +0200
committerDasIch <dasdasich@googlemail.com>2010-05-01 19:17:52 +0200
commita25745aa06d3cdad97988e8795fb2492133a55c8 (patch)
tree8e0d0a241c215040ebc33f1deb33c875bcaa5dfa /sphinx
parent455ebde09dc55d91088d15a89fab0f2dfd1d3b51 (diff)
downloadsphinx-a25745aa06d3cdad97988e8795fb2492133a55c8.tar.gz
Fixed issue #1
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/environment.py3
-rw-r--r--sphinx/pycode/pgen2/tokenize.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/sphinx/environment.py b/sphinx/environment.py
index 5edcb4d9..fa8460cb 100644
--- a/sphinx/environment.py
+++ b/sphinx/environment.py
@@ -1488,8 +1488,9 @@ class BuildEnvironment:
i += 1
# group the entries by letter
- def keyfunc2((k, v), letters=string.ascii_uppercase + '_'):
+ def keyfunc2(item, letters=string.ascii_uppercase + '_'):
# hack: mutating the subitems dicts to a list in the keyfunc
+ k, v = item
v[1] = sorted((si, se) for (si, (se, void)) in v[1].iteritems())
# now calculate the key
letter = k[0].upper()
diff --git a/sphinx/pycode/pgen2/tokenize.py b/sphinx/pycode/pgen2/tokenize.py
index 4489db89..7ad9f012 100644
--- a/sphinx/pycode/pgen2/tokenize.py
+++ b/sphinx/pycode/pgen2/tokenize.py
@@ -143,7 +143,9 @@ class TokenError(Exception): pass
class StopTokenizing(Exception): pass
-def printtoken(type, token, (srow, scol), (erow, ecol), line): # for testing
+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))