Trinary operator?

Just van Rossum just at xs4all.nl
Wed Apr 17 15:00:47 EDT 2002


In article <mailman.1019066614.29792.python-list at python.org>,
 "Mark McEahern" <marklists at mceahern.com> wrote:

> > Not that it's a big deal since there's many ways to do that, but can I use
> > something like
> >     verboseGender = (gender == 'm') ? 'male' : 'female'
> > in Python?
> 
> People seem to use and/or for that:

But they shouldn't.

Just



More information about the Python-list mailing list