From: Alan G I. <ai...@am...> - 2006-07-11 15:39:34
|
On Tue, 11 Jul 2006, Norbert Nemec apparently wrote:=20 > else: # for compatibility:=20 > set =3D {}=20 > for item in inseq:=20 > set[item] =3D None=20 > if sort:=20 > return asarray(sorted(set.keys()))=20 > else:=20 > return asarray(set.keys())=20 I'm currently in major caffeine deficit, but aside from backward compatability, how is this better than: else: #for compatability items =3D list(set(inseq)) if sort: items.sort() return asarray(items) Alan Isaac PS Actually, making a list of a set may already sort? No time to check now ... PPS For to 2.3, need set =3D sets.Set |