[pypy-commit] pypy default: Alex Gaynor's error message patch to help people like me figure out what they are doing wrong
justinpeel
noreply at buildbot.pypy.org
Tue Aug 2 08:18:13 CEST 2011
Author: Justin Peel <notmuchtotell at gmail.com>
Branch:
Changeset: r46177:4b3c8fa61ddd
Date: 2011-08-02 00:18 -0600
http://bitbucket.org/pypy/pypy/changeset/4b3c8fa61ddd/
Log: Alex Gaynor's error message patch to help people like me figure out
what they are doing wrong
diff --git a/pypy/interpreter/gateway.py b/pypy/interpreter/gateway.py
--- a/pypy/interpreter/gateway.py
+++ b/pypy/interpreter/gateway.py
@@ -64,7 +64,7 @@
self.visit_self(el[1], *args)
else:
self.visit_function(el, *args)
- else:
+ elif isinstance(el, type):
for typ in self.bases_order:
if issubclass(el, typ):
visit = getattr(self, "visit__%s" % (typ.__name__,))
@@ -73,6 +73,8 @@
else:
raise Exception("%s: no match for unwrap_spec element %s" % (
self.__class__.__name__, el))
+ else:
+ raise Exception("unable to dispatch, %s, perhaps your parameter should have started with w_?" % el)
def apply_over(self, unwrap_spec, *extra):
dispatch = self.dispatch
More information about the pypy-commit
mailing list