PEP-308 a "simplicity-first" alternative

Paul Paterson hamonlypaulpaterson at houston.rr.com
Wed Feb 12 04:09:18 CET 2003


"Christian Tismer" <tismer at tismer.com> wrote in message
news:mailman.1045015194.30601.python-list at python.org...
>
> Anyway, please show me any other proposal that is
> as minimalistic as this one. Please, stare at it
> a little while and weight it's impact to the simplicity
> of the language, readability, ease of impl, and getting
> all these threads to a happy shut-down (or -up).

I still like the minimalism of,

x or y if C

As in,

val = sqrt(x) or "imaginary" if x<0

- No new keywords
- key elements (normal case+condition) are at the ends so you can visually
find them easily
- reads ok to me (pronounces "val equals x (or y if C is true)" ... perhaps
it could even be written that way

Another plus for me is that its quite hard to extend into a compound
expression because it gets mind bending to write as well as read. I like
things that scale in complexity in the same way as you both write and read
them.






More information about the Python-list mailing list