PEP 308: an additional "select/when" survey option
francois lepoutre
franck.lepoutre at caramail.com
Wed Mar 5 04:15:38 EST 2003
> CASE WHEN value = 0 THEN 'zero'
> WHEN value = 2 THEN 'one'
> ELSE 'unknown'
> END
>
> and...
>
> CASE value
> WHEN 0 THEN 'zero'
> WHEN 2 THEN 'one'
> ELSE 'UNKNOWN'
> END
>
Being a db-oriented person,
I use sql standard conditional constructs
both IF and CASE expressions on daily basis.
It is definitely not rocket-science support stuff.
But it'd sure help some people maintain routine stuff
in business app, most specifically people who try to
use python as a server-script engine à la ASP, PHP.
Any feedback from the PSP (and AL) user community...
François
More information about the Python-list
mailing list