[Python-ideas] ('blue', 'red', 'orange' if something, 'green')

Sturla Molden sturla at molden.no
Fri Apr 22 22:47:02 CEST 2011


Den 22.04.2011 21:07, skrev Eric Snow:
>
> a = 'orange' if cond else None
>

I like this interpretation:


a = 'orange' if cond else pass

(1, 2, 3, pass, 4) == (1,2,3,4)

pass,a,b = a,b



Sturla







More information about the Python-ideas mailing list