Issue 32496: lib2to3 fails to parse a ** of a conditional expression (original) (raw)

see the attached sample code demonstrating the problem.

basically lib2to3 fails to parse:

dummy(**kwargs if kwargs else dict())

with an error like:

raise ParseError("bad input", type, value, context)

lib2to3.pgen2.parse.ParseError: bad input: type=1, value='if', context=(' ', (3, 21))