More elegant solution for diffing two sequences

Neil Cerutti neilc at norwich.edu
Fri Dec 4 13:20:26 EST 2009


On 2009-12-04, Ulrich Eckhardt <doomster at knuut.de> wrote:
> Lie Ryan wrote:
> Thinking about it, I perhaps should store the glyphs in a set
> from the beginning. Question is, can I (perhaps by providing
> the right hash function) sort them by their codepoint? I'll
> have to look at the docs...

No, sets are unordered in Python.

You'll need to sort them when you need them sorted, or keep a
sorted list separately.

-- 
Neil Cerutti



More information about the Python-list mailing list