[pypy-dev] [pypy-svn] r75824 - in pypy/branch/interplevel-array/pypy/module/array: . test

Hakan Ardo hakan at debian.org
Mon Jul 5 07:54:59 CEST 2010

On Sun, Jul 4, 2010 at 10:25 PM, Maciej Fijalkowski <fijall at gmail.com> wrote:
> Hey. This looks a bit ugly,

 It does, doesn't it :)

>  you can definitely do it with some
> constant dict or something

Yes, there is an overflow check needed on the integer types but not on
the character an float types, but I guess that could be solved with a
flag in the dict.

I was actually considering to introduce separate subclasses for each
typecode overriding intem_w and descr_getitem. That would get rid of
the typecode attribute lookup all together.

> (we have special support for iterating over
> constants and unrolling the iteration, look for unrolling_iterable).
> Also, annotator can fold a bunch of ifs into a switch, but not if "in"
> operator is used (or is fine though).

That's nice features, good to know about. Thanx.

Håkan Ardö

More information about the Pypy-dev mailing list