Trinary operator?

Emile van Sebille emile at fenx.com
Wed Apr 24 17:01:28 EDT 2002


Oyvind Gronnesby
> * Cimarron Taylor
> |
> | Will this do what you want?
> | 
> | verboseGender = ('female','male')[gender=='m']
> 
> Wouldn't this break in a PEP 285 Python world?
> 


You're not suggesting there's only 1 True gender?  ;-))

--

Emile van Sebille
emile at fenx.com

---------




More information about the Python-list mailing list