creating an artificial "last element" in sort list
duncan smith
buzzard at invalid.invalid
Fri Sep 28 21:19:35 EDT 2012
On 29/09/12 00:51, dave wrote:
> more clearer, this is a more realistic use case:
>
> ['awefawef', 'awefawfsf', 'awefsdf', 'zzzzzzzzzzzzzz', 'zzzzzzzzzzzzzz', 'zzzzzzzzzzzzzz']
>
> and the quantity of ''zzzzzzzzzzzzzz'' would be dynamic.
>
Maybe,
class Greatest:
def __lt__(self, other):
return False
def __eq__(self, other):
return type(other) == type(self)
etc.
Duncan
More information about the Python-list
mailing list