[pypy-commit] pypy default: debug_repr() may not be implemented in all subclasses. It's usually a
arigo
noreply at buildbot.pypy.org
Sat Mar 31 15:30:25 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r54107:5b9f7aa356a0
Date: 2012-03-31 15:28 +0200
http://bitbucket.org/pypy/pypy/changeset/5b9f7aa356a0/
Log: debug_repr() may not be implemented in all subclasses. It's usually
a minor bug because it's a useful debugging feature, but still, it
shouldn't give us segfaults in the translated pypy.
diff --git a/pypy/module/micronumpy/signature.py b/pypy/module/micronumpy/signature.py
--- a/pypy/module/micronumpy/signature.py
+++ b/pypy/module/micronumpy/signature.py
@@ -107,6 +107,10 @@
arr.compute_first_step(self, f)
return f
+ def debug_repr(self):
+ # should be overridden, but in case it isn't, provide a default
+ return str(self)
+
class ConcreteSignature(Signature):
_immutable_fields_ = ['dtype']
More information about the pypy-commit
mailing list