On 06/25/2010 10:41 PM, Alan G Isaac wrote: > Surprising for a moment, if you don't > immediatelyrecognize it as a chained comparison. > (Just sharing.) > Alan Isaac > >>>> None is None is None > True >>>> (None is None) is None > False >>>> None is (None is None) > False >
Chained comparisons - one of those language features that some of the time makes code enormously more readable, but the rest of the time are rather disconcerting to those of us coming from pretty much any other programming language. Thomas -- http://mail.python.org/mailman/listinfo/python-list