MonkeeSage: > Here's yet another take on a unique() function for sequences. It's > more terse than others I've seen and works for all the common use > cases (please report any errors on the recipe page):
It's more terse, but my version is built to be faster in the more common cases of all hashable or/and all sortable items (while working in other cases too). Try your unique on an unicode string, that's probably a bug (keepstr is being ignored). Version by Paul Rubin is very short, but rather unreadable too. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list