for -- else: what was the motivation?

Chris Angelico rosuav at gmail.com
Sun Oct 16 11:05:58 EDT 2022


On Sun, 16 Oct 2022 at 22:47, Antoon Pardon <antoon.pardon at vub.be> wrote:
>
>
>
> Op 16/10/2022 om 13:03 schreef Chris Angelico:
> > On Sun, 16 Oct 2022 at 21:19, Antoon Pardon<antoon.pardon at vub.be>  wrote:
> >
> >> My idea would be to reserve different unicode blocks for the keywords
> >> and the identifiers. e.g. We could reserve the mathematical alphanumeric
> >> block for keywords and all other letters and numbers for identifiers.
> >> Doing so would allow extenting the keywords without breaking programs
> >> that already use that combination as an identifier.
> > Python currently defines identifiers as follows:
> > https://docs.python.org/3/reference/lexical_analysis.html#identifiers
> >
> > Briefly, what it means is that (aside from some backward compatibility
> > special cases) an identifier contains letters, numbers, and connector
> > punctuation, and must not start with a number. It's not by blocks,
> > it's by types.
> >
> > It's way WAY too late to change what's allowed for identifiers, as you
> > will potentially be breaking programs that use the current rules.
>
> So? Python has broken backward compatibility before. The cost could
> be acceptable. How many programs do you estimated use the mathematical
> alphanumeric block for an identifier at this moment?

> Why would I need good luck? I expressed an idea and you didn't like it.
> That won't affect my life in a meaningful way.

Well, with that attitude, it's not going to affect anyone else's life
either, so go ahead, carry on.

ChrisA


More information about the Python-list mailing list