projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
911b803
)
fix error context output
author
Stefan Behnel
<scoder@users.berlios.de>
Mon, 9 Jun 2008 12:50:57 +0000
(14:50 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Mon, 9 Jun 2008 12:50:57 +0000
(14:50 +0200)
Cython/Compiler/Errors.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Errors.py
b/Cython/Compiler/Errors.py
index 84a69deebdbdc0fdda58f6a511a4d2b190ea7a66..331ad921ac319c5c23ec8fd32664f28fe6a32cf9 100644
(file)
--- a/
Cython/Compiler/Errors.py
+++ b/
Cython/Compiler/Errors.py
@@
-18,7
+18,7
@@
def context(position):
assert not (isinstance(source, unicode) or isinstance(source, str)), (
"Please replace filename strings with Scanning.FileSourceDescriptor instances %r" % source)
F = list(source.get_lines())
- s = ''.join(F[m
in
(0, position[1]-6):position[1]])
+ s = ''.join(F[m
ax
(0, position[1]-6):position[1]])
s += ' '*(position[2]-1) + '^'
s = '-'*60 + '\n...\n' + s + '\n' + '-'*60 + '\n'
return s