2009/3/8 Vincent Legoll <[email protected]>: > def set_sequences_iter(self, *sequences): > assert 0 <= len(sequences) <= 3 > self.diffs = [[], []] > self.num_sequences = len(sequences) > self.seqlength = [len(s) for s in sequences] > > if self.num_sequences >1: > for i in range(self.num_sequences - 1): > matcher = IncrementalSequenceMatcher(None, > sequences[1], sequences[i*2]) > work = matcher.initialise() > while work.next() == None: > yield None > self.diffs[i] = matcher.get_difference_opcodes() > yield 1 > > Looks even shorter to me
Nice - can even get rid of that first 'if' with no effect. Kai _______________________________________________ meld-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/meld-list
