[New-bugs-announce] [issue45764] Parse error improvement forgetting ( after def

Carl Friedrich Bolz-Tereick report at bugs.python.org
Tue Nov 9 06:15:43 EST 2021


New submission from Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>:

Something I see beginners make occasionally when defining functions without arguments is this:

def f:
    ...

Right now it just gives an "invalid syntax", would be nice to get an "expected '('".

I will try to give this a go! Should be a matter of making the '(' token an expected one.

----------
messages: 406010
nosy: Carl.Friedrich.Bolz
priority: normal
severity: normal
status: open
title: Parse error improvement forgetting ( after def

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45764>
_______________________________________


More information about the New-bugs-announce mailing list