for -- else: what was the motivation?

Chris Angelico rosuav at gmail.com
Sun Oct 16 22:01:16 EDT 2022


On Mon, 17 Oct 2022 at 10:46, <avi.e.gross at gmail.com> wrote:
>
> My point Chris was that you can have a conversation where you are exploring
> and not proposing. Brainstorming, perhaps.

And my point is that either a proposal is a serious one that can
expect serious discussion, or it isn't. Yes, I'm aware that it wasn't
you who backpedalled as soon as any criticism was posted, but your
caveat comes to the same thing - if you're trying to avoid serious
criticism, you have to not post an idea.

> So my POINT (and I repeat NOT a suggestion) is that I can IMAGINE ways to
> add a feature to a loop, such as an extra optional argument that is called
> if the loop exits from the bottom. The code you now put in the ELSE clause
> might have to be in the lambda or whatever. That may not be a good fit for
> Python.

If you're inventing a completely new language, you can do whatever you
like, but it's not very practical to discuss small features when
there's no language to discuss them in. So are you discussing this as
a Python feature, or just saying "hey, in a vacuum, we could do this",
which is vacuously true?

> What may aggravate you is that lots of people keep telling you that the ELSE
> on a loop feature is not intuitive to many, sometimes even after it is
> explained.

I know it's unintuitive. That doesn't stop it being useful.

> My suggestion is you should deal with that and not take it out on others.
> Live and let live.

That's unrelated. Sorry to disappoint you.

> This forum may be about Python but not exclusively. I personally often enjoy
> hearing how some other system does something similar, such as discussions on
> how and whether Python should allow an underscore in static numbers given
> other languages do so, not always identically. We can learn from such
> comparisons, for good and also for bad.

That's correct, but usually there's at least SOME context. And if none
is given, is it or is it not reasonable to assume that people are
talking about Python?

> But if it makes you happy, take me off this list! I have so many things I
> need to do and free up time for.

I'm not in a position to do that, and my point was to show how
ridiculous empty proposals are :)

ChrisA


More information about the Python-list mailing list