Author: Maciej Fijalkowski <[email protected]>
Branch: numpy-record-dtypes
Changeset: r52163:f54da73f8d03
Date: 2012-02-07 13:01 +0200
http://bitbucket.org/pypy/pypy/changeset/f54da73f8d03/
Log: yet another approach
diff --git a/pypy/module/micronumpy/types.py b/pypy/module/micronumpy/types.py
--- a/pypy/module/micronumpy/types.py
+++ b/pypy/module/micronumpy/types.py
@@ -542,8 +542,11 @@
def _setup():
for name, tp in globals().items():
if isinstance(tp, type):
- class NonNative(NonNativePrimitive, tp):
+ class NonNative(tp):
pass
+ for item, v in NonNativePrimitive.__dict__.items():
+ if not item.startswith('__'):
+ setattr(NonNative, item, v)
NonNative.__name__ = 'NonNative' + name
globals()[NonNative.__name__] = NonNative
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit