[pypy-dev] understanding and fixing rtyper warnings

Armin Rigo arigo at tunes.org
Thu Apr 4 12:02:09 CEST 2013


Hi Fijal, hi Bengt,

On Thu, Apr 4, 2013 at 10:50 AM, Bengt Richter <bokr at oz.net> wrote:
> PMJI without understanding your context, but if "noone stores null there,"
> couldn't you turn the warning around to warn when/if someone *does*
> store a null "there," and disable the current warning? (I'm naively assuming
> all the places that pass W_Root-or-None pass it to/through one/few place/s
> that can be monitored on the way to becoming keys (which I guess never
> happens?)).

Yes, we could try that.  I don't think we ever did.  Basically it
would mean crashing early at annotation whenever someone tries to
store a key or value that we know the rtyper would give such a warning
about later on.  Then we're left with adding a few "assert x is not
None" in the source code.


A bientôt,

Armin.


More information about the pypy-dev mailing list