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

Hakan Ardo hakan at debian.org
Mon Jul 5 08:53:20 CEST 2010


I've checked in a dict-based version. Not sure it became that clean
after all. Is the getattr(space, tc.unwrap) construction ok?

On Mon, Jul 5, 2010 at 7:26 AM, Hakan Ardo <Hakan at ardoe.net> wrote:
> 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ö
>



-- 
Håkan Ardö



More information about the Pypy-dev mailing list