And thus spake Steve Holden <st...@holdenweb.com> Tue, 30 Mar 2010 13:56:04 -0400:
> >> 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. > > Yes, that's deliberately awful syntax. Guido designed it that way to > ensure that people didn't aver-use it, thereby reducing the readability > of Python applications. Speaking purely personally I hardly ever use it, > but don't dislike it. In fact, the syntax just shouts 'do [...] unless' to me. And that's so strong a Perl-ism I cannot quite express how ugly I actually find it... Regards, Robert -- http://mail.python.org/mailman/listinfo/python-list