bpo-44792: Improve syntax errors for if expressions (GH-27506) (GH-27565)

(cherry picked from commit 28b6dc9dd5d1ce6f8aff7e06d4ef9afdc2bc8332)

Co-authored-by: Miguel Brito <5544985+miguendes@users.noreply.github.com>
5 files changed