consolidate py/code files into code.py, simplify SafeRepr code and docs.

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-08-25 20:24:43 +02:00
parent 94aef0b771
commit 8ee7bef638
14 changed files with 713 additions and 758 deletions

View File

@@ -181,7 +181,8 @@ class Source(object):
source = "\n".join(self.lines) + '\n'
try:
co = cpy_compile(source, filename, mode, flag)
except SyntaxError, ex:
except SyntaxError:
ex = sys.exc_info()[1]
# re-represent syntax errors from parsing python strings
msglines = self.lines[:ex.lineno]
if ex.offset: