[Python-ideas] In call grammar, replace primary with possible_call? (was Re: ...quote followed by a left parenthesis...?)

Paul Moore p.f.moore at gmail.com
Thu Jul 16 11:00:28 CEST 2015

On 16 July 2015 at 05:18, Steven D'Aprano <steve at pearwood.info> wrote:
> On Wed, Jul 15, 2015 at 07:03:50PM -0400, Terry Reedy wrote:
>> So here is the proposal: in the call definition, change primary to
>>   possible_call ::= identifier | parenth_form | yield_atom
>>                     | attributeref | subscription | slicing | call
>> As for error messages, there is another thread suggesting that the
>> messages for SyntexError might be vastly improved.
> This sounds like a good proposal. +1

Note that the proposal should also include a change to "call":

call ::= possible_call '(' args ')'


call  ::= primary '(' args ')'

(I was initially confused by the fact that possible_call included call
as an option, until I remembered how it fitted into the larger

This seems to me like more complexity than is warranted, particularly
as the error message quality drops dramatically (unless we improve the
syntax error message at the same time).

So I'm -0 on this.

More information about the Python-ideas mailing list