On Tue, 30 Mar 2010 10:08:31 -0700, John Nagle wrote: >> Yes, Python has ternary operator-like syntax: return ('Yes' if a==b >> else 'No') >> >> Note that this requires a recent version of Python. > > Who let the dogs in? That's awful syntax.
I used to think so to, but now I like it. It matches common English syntax like: "I'm going to the movies tonight, if I leave the office early, otherwise I'll stay home and nitpick on Usenet." -- Steven -- http://mail.python.org/mailman/listinfo/python-list