On Mon, Oct 13, 2014 at 5:38 AM, Tony the Tiger <tony@tiger.invalid> wrote: >> colour = 'red' if colour == 'blue' else 'blue' > > I call that a subtle bug that most likely will jump up and bite your > behind when you least expect it.
More generally, I'd say that this is solving a (very) slightly different problem: it's providing a "toggle with default" feature, where the part after the else is the default. If you don't want a default, that's a bug. I've known times when that default makes life a lot easier, in which case it'd be a feature. ChrisA -- https://mail.python.org/mailman/listinfo/python-list