On Mon, Feb 10, 2014 at 4:53 AM, Ethan Furman <et...@stoneleaf.us> wrote: > Shouldn't that be: > > class Pig: > def fly(self): > "Soar gracefully through the air if a hot place is very cold." > if hell is frozen: > self.sprout_wings() > self.altitude += 10 > self.velocity += 25 > else: > self.splat() > > ;)
The Python 'is' operator does not do what you think it does. If it did, 'hell is frozen' would mean that one could say 'war is frozen', which makes no sense. No, I think this calls for a LISP-style predicate: if frozenp(hell): ChrisA -- https://mail.python.org/mailman/listinfo/python-list