On Mon, 4 Oct 2021 at 07:16, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > > On 4/10/21 6:23 pm, Guido van Rossum wrote: > > On Sun, Oct 3, 2021 at 9:20 PM Jonathan Goble <jcgob...@gmail.com > > <mailto:jcgob...@gmail.com>> wrote: > > > > Therefore my vote is for requiring `except* E` and keeping `except > > *E` as a SyntaxError. > > > > You can't do that with our current lexer+parser. > > I don't think it would be desirable in any case. The separation of > tokens into alphanumeric and non-alphanumeric is deeply embedded in > every Python programmer's brain by now, and we shouldn't mess with > it.
Agreed. Having "except*" be a single token, distinguished from the pair of tokens "except" "*" only by the presence of whitespace, would be extremely confusing. And yes, I am aware that 3.as_integer_ratio() and 3. as_integer_ratio() are syntax errors, whereas 3 .as_integer_ratio() and 3 . as_integer_ratio() are valid. IMO, that's *also* very confusing, and serves as a warning to not do that again, and not as an example of how it's OK and we can do more of that... Paul _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/IKWKS6VYWFQ4XEXJ4XFYBLPRPXATKGGL/ Code of Conduct: http://python.org/psf/codeofconduct/