Author: Maciej Fijalkowski <[email protected]>
Branch: missing-ndarray-attributes
Changeset: r60807:fc4b0f0d3af8
Date: 2013-02-01 14:00 +0200
http://bitbucket.org/pypy/pypy/changeset/fc4b0f0d3af8/
Log: explode when trying to create a PBC of a mixin class (it won't work)
diff --git a/pypy/module/micronumpy/arrayimpl/sort.py
b/pypy/module/micronumpy/arrayimpl/sort.py
--- a/pypy/module/micronumpy/arrayimpl/sort.py
+++ b/pypy/module/micronumpy/arrayimpl/sort.py
@@ -84,8 +84,7 @@
itemtype = arr.dtype.itemtype
if (not isinstance(itemtype, types.Float) and
not isinstance(itemtype, types.Integer) and
- not isinstance(itemtype, types.ComplexFloating)
- ):
+ not isinstance(itemtype, types.ComplexFloating)):
# XXX this should probably be changed
raise OperationError(space.w_NotImplementedError,
space.wrap("sorting of non-numeric types " + \
diff --git a/rpython/annotator/bookkeeper.py b/rpython/annotator/bookkeeper.py
--- a/rpython/annotator/bookkeeper.py
+++ b/rpython/annotator/bookkeeper.py
@@ -447,6 +447,8 @@
if (x is type(None) or # add cases here if needed
x.__module__ == 'rpython.rtyper.lltypesystem.lltype'):
result = SomeType()
+ elif getattr(x, '_mixin_', False):
+ raise Exception("Creating a PBC of a mixin class is not
RPython")
else:
result = SomePBC([self.getdesc(x)])
elif callable(x):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit