PEP-308 a "simplicity-first" alternative
tanzer at swing.co.at
Wed Feb 12 07:36:39 CET 2003
Andrew Koenig <ark at research.att.com> wrote:
> holger> Inspired by "do the simplest thing that can possibly work" i
> holger> now think that
> holger> x and y else z
> holger> might just do it and avoid the need for a new construct.
> I thought so too when I first saw it, but now I'm less sure.
> For example, what is the meaning of
> w and x and y else z
> w and x and y else z else a
> (x and y) else z
Ooops. For the first expression I'd expected:
(w and x) and y else z
That fails miserably for the second, though. And both declaring it
illegally or trying to interpret it as
w and (x and y else z) else a
don't appeal to me at all.
Christian Tanzer tanzer at swing.co.at
Glasauergasse 32 Tel: +43 1 876 62 36
A-1130 Vienna, Austria Fax: +43 1 877 66 92
More information about the Python-list