Tim Harig <user...@ilthio.net> writes: > That being the case, it might be a good idea either to handle the situation > and raise an exception or add: > > assert self.lower <= self.higher > > That way an exception will be raised if there is an error somewhere else > in the code rather then silently passing a possibly incorrect value.
Well, that assert is not right because you have to handle the case where one of the values is None. The general sentiment is reasonable though, if you're concerned that the precondition may not be valid. -- http://mail.python.org/mailman/listinfo/python-list