PEP 308: more and more...

sismex01 at hebmex.com sismex01 at hebmex.com
Wed Feb 26 12:28:45 EST 2003


> From: John Roth [mailto:johnroth at ameritech.net]
> Sent: Wednesday, February 26, 2003 11:27 AM
> 
> "bormotov" <bor at vb.dn.ua> wrote in message
> news:d11b24c9.0302260836.2b3baf9a at posting.google.com...
> > Hi All!
> >
> >  small suggestion for PEP 308:
> >
> >  <cond> and then <exp1> or else <exp2>
> >
> >  + 'and', 'then', 'or', 'else' - already keywords
> >  + simular to "<cond> and <exp1> or <exp2>" => easy redable
> >  + simular to "if <cond> then <exp1> else <exp2>"  => easy readable
> >
> >  as variants:
> >
> >  <cond1> and then <exp1> or then <cond2> and then <exp2> ... or else
> <condN>
> 
> Red meat for the anti-COBOL crowd!
> 
> John Roth
>

Not really.  What about:

   x = please choose between TrueVal and FalseVal depending on Condition

But that seems a tad too wordy for me.  It promotes cut&paste
programming, I think.

Other options would be:

   x = choose TrueVal or FalseVal depending on Condition

but maybe that's a bit too terse.  It's easily expandable for
random number utilization:

;-)

intercal'y yrs

-gus





More information about the Python-list mailing list