Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

Ian Kelly ian.g.kelly at gmail.com
Tue Nov 7 12:28:49 EST 2017


On Sat, Nov 4, 2017 at 6:40 AM, Chris Angelico <rosuav at gmail.com> wrote:
> On Sat, Nov 4, 2017 at 11:25 PM, Jon Ribbens <jon+usenet at unequivocal.eu> wrote:
>> On 2017-11-04, Ben Finney <ben+python at benfinney.id.au> wrote:
>>> To respond to the criticism of an idea – criticism containing no mention
>>> of the person – as though it “clearly refers to the [person]”, is of
>>> significant concern on a software dicussion forum such as this.
>>
>> No, the thing that is "of significant conern on a software discussion
>> forum such as this" is people such as yourself defending the abuse of
>> other contributors.
>
> Maybe we're not defending the abuse of other contributors. Maybe we're
> defending a legitimate, if somewhat caustic, response to a ridiculous
> suggestion.

I don't think it was a ridiculous suggestion.

Assigment to False is a syntax error, even though it's lexically valid
and was accepted in the past.

Inconsistent indentation is a syntax error, even though it could be
parsed and has been in the past.

Wildcard imports inside a function are a syntax error, even though
it's lexically valid and mostly harmless.

Using "yield from" inside an async coroutine is a syntax error, even
though it's lexically valid and "await" and "yield from" are nearly
identical.

I haven't seen any argument against making "else" without "break" a
syntax error that wouldn't also apply to the above, with the exception
of Steve's manufactured interactive example ("manufactured" because
who really uses for-else interactively? If I really care that much
about output formatting I'm going to put it in a script). If there is
any extant code that would actually be broken by this, it's very
likely buggy.



More information about the Python-list mailing list