[pypy-issue] Issue #2562: Very confusing error message when using result of list.append in rpython (pypy/pypy)

Carl Friedrich Bolz issues-reply at bitbucket.org
Fri May 19 07:18:42 EDT 2017


New issue 2562: Very confusing error message when using result of list.append in rpython
https://bitbucket.org/pypy/pypy/issues/2562/very-confusing-error-message-when-using

Carl Friedrich Bolz:

This kind of RPython code produces a super confusing error message:
```
def g(l):
    return l.append(1)
def dummyfn():
    l = []
    g(l)
    return len(l)
```

the problem is the return in ``g``. The error message is in ``checkgraph``:

```
    def usevar(v, in_link=None):
>       assert v in vars
E       assert v139 in {v140: None, v141: None, l_26: None}
```

I don't particularly care about that code, but it took me ages to figure out why this errors :-(.




More information about the pypy-issue mailing list