# HG changeset patch # User paulb@localhost.localdomain # Date 1172447599 -3600 # Node ID 397411420aedeca2702b9d72ba7a51275f68f78d # Parent 920eb3dd45915d64ec86e466f6cf6fadff92f292 Added string comparison methods. diff -r 920eb3dd4591 -r 397411420aed lib/builtins.py --- a/lib/builtins.py Mon Feb 26 00:52:42 2007 +0100 +++ b/lib/builtins.py Mon Feb 26 00:53:19 2007 +0100 @@ -730,6 +730,42 @@ return str() + def __lt__(self, other): + if isinstance(other, str): + return bool() + else: + return NotImplemented + + def __gt__(self, other): + if isinstance(other, str): + return bool() + else: + return NotImplemented + + def __le__(self, other): + if isinstance(other, str): + return bool() + else: + return NotImplemented + + def __ge__(self, other): + if isinstance(other, str): + return bool() + else: + return NotImplemented + + def __eq__(self, other): + if isinstance(other, str): + return bool() + else: + return NotImplemented + + def __ne__(self, other): + if isinstance(other, str): + return bool() + else: + return NotImplemented + def __len__(self): return int()