else on the same line - howto

Asun Friere afriere at yahoo.co.uk
Thu Oct 16 21:19:27 EDT 2003


Alex Martelli <aleax at aleax.it> wrote in message news:<dHyjb.295947$R32.9705062 at news2.tin.it>...
> Helmut Jarausch wrote:
>    ...
> > So it's a pity that PEP 308 has been rejected since nobody is forced to
> > use such a construct if he/she doesn't like to.
> 
> Anybody programming as a part of a group can be "forced to use a construct"
> when maintaining others' code that uses it, ...

That I would have thought, was one of the best arguments _for_ 308. 
Ie, since people want this construct they will write it in all kinds
of ways, (some unsafe).  Against this 308 was proposing that one
obvious way to do it be adopted -- with obvious benefits for
maintaining other people's code.  Of course the adoption of a single
idiom would accomplish this as well.

Correct me if I'm wrong, but the way I understand it the reason 308
did not gain favour wasn't on the basis of "I don't wanna use it so
nobody should have it" (which is an non argument), nor of "When I'm
maintaining someone else's code I don't want to be confronted with a
single easily recognised construct" (which is an anti-argument).  
Rather, it was felt that the necessity for this construct was not
sufficient to justify the 'feature-creep' involved.  Given the
imperative to keep the language simple, and against the many requests
for new features, the 'ternary operator' just didn't cut it.




More information about the Python-list mailing list