Re: combinatorics via __future__ generators

2009-12-01 Thread Phlip
Awesome thanks - but: from itertools import imap,product Do we have a version for Python2.5? I have to support an older server here; can't install a newer python on it... -- http://mail.python.org/mailman/listinfo/python-list

Re: combinatorics via __future__ generators

2009-12-01 Thread John Yeung
On Dec 1, 5:55 pm, Phlip phlip2...@gmail.com wrote: Awesome thanks - but: from itertools import imap,product Do we have a version for Python2.5? I have to support an older server here; can't install a newer python on it... If you can get by with the performance of pure Python, a solution

combinatorics via __future__ generators

2009-11-18 Thread Phlip
Python: I have a quaint combinatorics problem. Before I solve it, or find a solution among generators, I thought y'all might like to show off any solutions. Given an array like this... [0, 4, 3] Produce an array like this: [ [0, 0, 0], [0, 1, 0], [0, 2, 0], [0, 3, 0],

Re: combinatorics via __future__ generators

2009-11-18 Thread Phlip
On Nov 18, 4:58 pm, Phlip phlip2...@gmail.com wrote: Python: I have a quaint combinatorics problem. Before I solve it, or find a solution among generators, I thought y'all might like to show off any solutions. Given an array like this...   [0, 4, 3] Produce an array like this:   [    

Re: combinatorics via __future__ generators

2009-11-18 Thread Chris Rebert
On Wed, Nov 18, 2009 at 4:58 PM, Phlip phlip2...@gmail.com wrote: Python: I have a quaint combinatorics problem. Before I solve it, or find a solution among generators, I thought y'all might like to show off any solutions. Given an array like this...  [0, 4, 3] Produce an array like