I'm starting out with this: try: if int(text) > 0: return True else: self.error_message() return False except ValueError: self.error_message() return False
I rewrote it as this: try: int(text) except ValueError: self.error_message() return False else: return True I think it's much cleaner, but obviously I lost the test in the original if statement. So my question is, can I still retain this second structure and still test for > 0, but not have any extra nesting? Thanks. -- http://mail.python.org/mailman/listinfo/python-list