On Mon, 4 Oct 2021 at 07:16, Greg Ewing <greg.ewing@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 <jcgoble3@gmail.com <mailto:jcgoble3@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