Simon Forman <sajmik...@gmail.com> writes: > ## Second snippet > > if self.higher is None: > if self.lower is None: > return > return self.lower > if self.lower is None: > return self.higher > > What do you think?
I'm not sure, but my guess is that what you are really trying to write is something like this: # self.higher and self.lower are each either "available" (i.e. are # not None), or unavailable (are None). Return the highest of the # available values. If no value is available, return None. if self.higher is not None: return self.higher elif self.lower is not None: return self.lower else: return None -- http://mail.python.org/mailman/listinfo/python-list