Author: Romain Guillebert <romain...@gmail.com> Branch: Changeset: r64738:e69d28ee34e0 Date: 2013-06-03 16:40 +0000 http://bitbucket.org/pypy/pypy/changeset/e69d28ee34e0/
Log: Change how boxes do cache lookup diff --git a/pypy/module/micronumpy/interp_boxes.py b/pypy/module/micronumpy/interp_boxes.py --- a/pypy/module/micronumpy/interp_boxes.py +++ b/pypy/module/micronumpy/interp_boxes.py @@ -30,7 +30,7 @@ def new_dtype_getter(name): def _get_dtype(space): from pypy.module.micronumpy.interp_dtype import get_dtype_cache - return getattr(get_dtype_cache(space), "w_%sdtype" % name) + return get_dtype_cache(space).dtypes_by_name[name] def new(space, w_subtype, w_value): dtype = _get_dtype(space) 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 @@ -273,7 +273,6 @@ fields = space.getitem(w_data, space.wrap(4)) self.set_fields(space, fields) - print self.itemtype class W_ComplexDtype(W_Dtype): def __init__(self, itemtype, num, kind, name, char, w_box_type, diff --git a/pypy/module/micronumpy/test/test_scalar.py b/pypy/module/micronumpy/test/test_scalar.py --- a/pypy/module/micronumpy/test/test_scalar.py +++ b/pypy/module/micronumpy/test/test_scalar.py @@ -21,7 +21,3 @@ a = zeros(3) assert loads(dumps(sum(a))) == sum(a) - - def setup_class(cls): - import py - py.test.xfail("FIXME: dtype('int32') == dtype('int32') fails (but only on 32-bit?)") _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit