[pypy-commit] pypy numpy-dtype-alt: Yay. Incredible improvement: actually *display* the graph
arigo
noreply at buildbot.pypy.org
Mon Aug 22 07:18:43 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: numpy-dtype-alt
Changeset: r46697:82779143884f
Date: 2011-08-22 07:23 +0200
http://bitbucket.org/pypy/pypy/changeset/82779143884f/
Log: Yay. Incredible improvement: actually *display* the graph passed in
the error message, instead of just displaying something very helpful
like "<return block>" and nothing else.
diff --git a/pypy/tool/error.py b/pypy/tool/error.py
--- a/pypy/tool/error.py
+++ b/pypy/tool/error.py
@@ -17,7 +17,7 @@
from pypy.interpreter.pytraceback import offset2lineno
import traceback
-def source_lines(graph, block, operindex=None, offset=None, long=False, \
+def source_lines1(graph, block, operindex=None, offset=None, long=False, \
show_lines_of_code=SHOW_DEFAULT_LINES_OF_CODE):
if block is not None:
if block is graph.returnblock:
@@ -61,6 +61,10 @@
lines.append("")
return lines
+def source_lines(graph, *args, **kwds):
+ lines = source_lines1(graph, *args, **kwds)
+ return ['In %r:' % (graph,)] + lines
+
class FlowingError(Exception):
pass
More information about the pypy-commit
mailing list