Re: More elegant solution for diffing two sequences

2009-12-04 Thread Lie Ryan
On 12/5/2009 4:20 AM, Ulrich Eckhardt 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... Python does not guarantee that a partic

Re: More elegant solution for diffing two sequences

2009-12-04 Thread MRAB
Ulrich Eckhardt wrote: Lie Ryan wrote: On 12/4/2009 8:28 AM, Ulrich Eckhardt wrote: I'm trying to write some code to diff two fonts. What I have is every character (glyph) of the two fonts in a list. I know that the list is sorted by the codepoints of the characters. What I'd like to ask is whe

Re: More elegant solution for diffing two sequences

2009-12-04 Thread Neil Cerutti
On 2009-12-04, Ulrich Eckhardt 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

Re: More elegant solution for diffing two sequences

2009-12-04 Thread Ulrich Eckhardt
Lie Ryan wrote: > On 12/4/2009 8:28 AM, Ulrich Eckhardt wrote: >> I'm trying to write some code to diff two fonts. What I have is every >> character (glyph) of the two fonts in a list. I know that the list is >> sorted by the codepoints of the characters. What I'd like to ask is >> whether there is

Re: More elegant solution for diffing two sequences

2009-12-03 Thread r0g
Lie Ryan wrote: > On 12/4/2009 8:28 AM, Ulrich Eckhardt wrote: >> I'm trying to write some code to diff two fonts. What I have is every >> character (glyph) of the two fonts in a list. I know that the list is >> sorted >> by the codepoints of the characters. What I'd like to ask is whether >> there

Re: More elegant solution for diffing two sequences

2009-12-03 Thread Lie Ryan
On 12/4/2009 8:28 AM, Ulrich Eckhardt wrote: I'm trying to write some code to diff two fonts. What I have is every character (glyph) of the two fonts in a list. I know that the list is sorted by the codepoints of the characters. What I'd like to ask is whether there is a more elegant solution to