PEP 308: I liked the original proposal better

Jon Perez jbperez808 at yahoo.com
Sat Feb 15 06:52:03 EST 2003


> >Yes, the test is in the middle of the expression. The argument "This is
> >not
> >the way other languages do ternary expressions" is not a valid argument=20
> >against its use. Python is about about doing things the Right Way, not
> >the
> >common accepted way.
>
> a = interesting_result if assert_condition else exceptional_value
>
> puts, or can put, the main payload first, and can round up
> the nasty exceptions afterwards.  I liked it.
>
>    Apparently enough people disliked it to have it removed
> from the ballot before the vote.


When it comes to syntax, the phrase "familiarity breeds contempt"
does not hold and there is ample justification why such should
be the case.

But didn't Python boldly do away with some _extremely_ familiar
syntactic conventions like free format nested structures?  From a
cursory point of view I find 'a if true else b' quite Pythonic.






More information about the Python-list mailing list