Created originally on Bitbucket by kostialopuhin (Konstantin Lopukhin)
Was already merged in Bitbucket before import, marked as merged by the import user
Fix an issue with parsing of list comprehensions - [x for x in a or b] used to misbehave. PyPy::
$ ~/opt/pypy3-2.1-beta1-osx64/bin/pypy
Python 3.2.3 (d63636b30cc0, Jul 30 2013, 07:02:48)
[PyPy 2.1.0-beta1 with GCC 4.2.1 Compatible Clang Compiler] on darwin
>>>> a, b = [1], []
>>>> [x for x in a or b]
[[1], []]
CPython::
$ python3
Python 3.2.4rc1 (v3.2.4rc1:b2cb7bc1edb8, Mar 25 2013, 00:39:29)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
>>> a, b = [1], []
>>> [x for x in a or b]
[1]
The fix is one line, and two tests are added. I ran all astcompiler tests, all seems to be fine. On default branch this handle_testlist is really required (else it fails to parse some list comprehensions), but I don't know why this bug does not appear on default.