[pypy-commit] pypy default: random beautification

alex_gaynor noreply at buildbot.pypy.org
Wed Oct 12 16:52:40 CEST 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r47965:22f84e5ca124
Date: 2011-10-12 10:52 -0400
http://bitbucket.org/pypy/pypy/changeset/22f84e5ca124/

Log:	random beautification

diff --git a/pypy/module/micronumpy/interp_dtype.py b/pypy/module/micronumpy/interp_dtype.py
--- a/pypy/module/micronumpy/interp_dtype.py
+++ b/pypy/module/micronumpy/interp_dtype.py
@@ -426,23 +426,22 @@
     pass
 
 if LONG_BIT == 32:
-    class W_LongDtype(W_Int32Dtype):
-        pass
+    long_dtype = W_Int32Dtype
+    ulong_dtype = W_UInt32Dtype
+elif LONG_BIT == 64:
+    long_dtype = W_Int64Dtype
+    ulong_dtype = W_UInt64Dtype
+else:
+    assert False
 
-    class W_ULongDtype(W_UInt32Dtype):
-        pass
-else:
-    class W_LongDtype(W_Int64Dtype):
-        pass
+class W_LongDtype(long_dtype):
+    num = 7
+    aliases = ["l"]
+    applevel_types = ["int"]
 
-    class W_ULongDtype(W_UInt64Dtype):
-        pass
-
-W_LongDtype.num = 7
-W_LongDtype.aliases = ["l"]
-W_LongDtype.applevel_types = ["int"]
-W_ULongDtype.num = 8
-W_ULongDtype.aliases = ["L"]
+class W_ULongDtype(ulong_dtype):
+    num = 8
+    aliases = ["L"]
 
 W_Float32Dtype = create_low_level_dtype(
     num = 11, kind = FLOATINGLTR, name = "float32",


More information about the pypy-commit mailing list