[pypy-dev] Support for __getitem__ in rpython?

Armin Rigo arigo at tunes.org
Sat Dec 27 19:45:13 CET 2008


On Fri, Dec 26, 2008 at 11:31:53AM +0100, Hakan Ardo wrote:
> But if I replace None with NotImplemented, it does not compile
> anymore. So, can we get the annotater to treat NotImplemented in a
> similar manner as it treats None?

You can try, but it's messy.  It's not a problem for the annotator but
for the later RTyper.  None is implemented as a NULL pointer by the
RTyper; I don't know how you would distinguish between None-as-a-NULL
and NotImplemented.  You could try to go for something like ((TYPE*) 1),
but this doesn't work on top of ootype, where you really have only one
NULL value.

A bientot,


More information about the Pypy-dev mailing list