[issue45759] `elif` inside `if` block is a `SyntaxError`

2021-11-08 Thread theeshallnotknowethme


Change by theeshallnotknowethme :


--
keywords: +patch
pull_requests: +27732
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29481

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45759] `elif` inside `if` block is a `SyntaxError`

2021-11-08 Thread theeshallnotknowethme


New submission from theeshallnotknowethme :

While fixing errors in a program, I encountered this:

if a == b + 2:
c = sqrt(b) + a**2
elif a == b + 3:

SyntaxError: Invalid syntax

It should be giving an `IndentationError` or a better error message at least.

--
components: Parser
messages: 405990
nosy: February291948, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: `elif` inside `if` block is a `SyntaxError`
type: behavior
versions: Python 3.10, Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com