On Fri, Jan 17, 2020, at 21:32, Josh Rosenberg wrote: > The colon remains syntactically necessary in some cases, particularly > to disambiguate cases involving one-lining (no block involved). Stupid > example: If the colon is optional, what does:
I was only proposing making it optional in the multi-line case. The following in the grammar: [anywhere it appears]: ... ':' suite suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT would be replaced with [whatever]: ... compound_body compound_body: ':' simple_stmt | [':'] NEWLINE INDENT stmt+ DEDENT (I don't understand how TYPE_COMMENT interacts with NEWLINE/INDENT/DEDENT well enough to do the same for func_body_suite in terms of the actual grammar) _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/UGS2WPCEUWVOZFRZ6W2ZSDVN44OMSDG4/ Code of Conduct: http://python.org/psf/codeofconduct/