Re: Initializing a set from a list

2006-06-21 Thread Robert Kern
Xiaolei wrote: > Sybren Stuvel wrote: > >>Xiaolei enlightened us with: >> >>>from pylab import * >> >>You'd better not do that. Just use "import pylab". >> >>>If I remove the first line, I correctly get: >>> >>>[1, 2, 3, 3] >>> >>>set([1, 2, 3]) >> >>Pylab shadows the built-in set name, which is o

Re: Initializing a set from a list

2006-06-21 Thread Xiaolei
Sybren Stuvel wrote: > Xiaolei enlightened us with: > > from pylab import * > > You'd better not do that. Just use "import pylab". > > > If I remove the first line, I correctly get: > > > > [1, 2, 3, 3] > > > > set([1, 2, 3]) > > Pylab shadows the built-in set name, which is one of the reasons you

Re: Initializing a set from a list

2006-06-20 Thread Xiaolei
Robert Kern wrote: > Xiaolei Li wrote: > > Hi, > > > > I'm trying to initialize a set from a list but am unable to do so. My > > list "c", looks like: > > > > [(1.00909, 0.91966, -0.13550388182991072, 0), > > (0.874239991, 0.7001, -0.2123048713754, 0)] > > > > S

Re: Initializing a set from a list

2006-06-20 Thread Robert Kern
Xiaolei Li wrote: > Hi, > > I'm trying to initialize a set from a list but am unable to do so. My > list "c", looks like: > > [(1.00909, 0.91966, -0.13550388182991072, 0), > (0.874239991, 0.7001, -0.2123048713754, 0)] > > So basically a list of 2 tuples, each

Initializing a set from a list

2006-06-20 Thread Xiaolei Li
Hi, I'm trying to initialize a set from a list but am unable to do so. My list "c", looks like: [(1.00909, 0.91966, -0.13550388182991072, 0), (0.874239991, 0.7001, -0.2123048713754, 0)] So basically a list of 2 tuples, each with 4 elements. Since tuples are