Re: [Pythonmac-SIG] py2app 64 bit or 32 bit

2010-10-29 Thread BjornJohansson
Ok, thanks for the reply It is a pain to build executables for mac if you dont own a mac Apple does not permit you to run it as a virtual machine either... I think it would be in their interest to distribute a (crippled) version that could be used to build software, since less software is ava

Re: [Pythonmac-SIG] If/else vs or

2010-10-29 Thread Chris Weisiger
Or you could use actual sets: >>> colors = set(['red', 'green', 'blue', 'orange', 'fuscia', 'black', 'white']) >>> subset = set(['red', 'green', 'blue', 'purple']) >>> subset.intersection(colors) set(['blue', 'green', 'red']) Of course, this loses your ordering, but it's otherwise far easier to r

Re: [Pythonmac-SIG] If/else vs or

2010-10-29 Thread Dan Ross
Indeed. That's awfully nice and concise. On Fri, 29 Oct 2010 09:14:06 -0700, Christopher Barker wrote: > On 10/29/10 7:56 AM, Dan Ross wrote: > > I've been trying to use more list comprehensions recently. > > ahh -- then you want something like: > > In [15]: colors = ['red','green','blue','ora

Re: [Pythonmac-SIG] If/else vs or

2010-10-29 Thread Christopher Barker
On 10/29/10 7:56 AM, Dan Ross wrote: > I've been trying to use more list comprehensions recently. ahh -- then you want something like: In [15]: colors = ['red','green','blue','orange','fuchsia','black','white'] In [16]: subset = ['red','green','blue','purple'] In [17]: [c for c in colors if c

Re: [Pythonmac-SIG] If/else vs or

2010-10-29 Thread Dan Ross
I've been trying to use more list comprehensions recently. I was just fleshing something out which brought on my post. On Fri, 29 Oct 2010 09:15:47 -0400, Henry Olders wrote: When dealing with lists, list comprehensions are shorter and easier to work with: l=['red','green','orange','blue','r