The use of frozenset can okay when sub-sequences are longer, but for
this problem it's slow, and anyway there are situations of repeated
data like this that have to be considered:

frozenset( ('a', 'a') )
==>
frozenset(['a'])

For Py2.4 the faster and better solution seems Peter Otten one.
James Stroud solution is O(n^2) and it can become slow for long
lists...

Bear hugs,
Bearophile

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to