On 29/09/12 03:15:24, Peter Pearson wrote:
> On Fri, 28 Sep 2012 09:49:36 -0600, Ian Kelly wrote:
>>
>> levels = 6
>> for combination in itertools.product(xrange(n_syms), levels):
>> # do stuff
>
n_syms = 3
levels = 6
for combination in itertools.product(xrange(n_syms), levels)
On Fri, 28 Sep 2012 09:49:36 -0600, Ian Kelly wrote:
>
> levels = 6
> for combination in itertools.product(xrange(n_syms), levels):
> # do stuff
>>> n_syms = 3
>>> levels = 6
>>> for combination in itertools.product(xrange(n_syms), levels):
... print combination
...
Traceback (most recent
On 2012-09-28, Laszlo Nagy wrote:
> In your example, it seem that the iterable of the for loop is
> always the same: range(n_sysms). It seems to be a number. Is
> that true? If that is so, then here is something useful:
>
> import copy
>
> class MultiLevelIterator(object):
> def __init__(self
On Sep 28, 2012 9:49 AM, "Ian Kelly" wrote:
> levels = 6
> for combination in itertools.product(xrange(n_syms), levels):
> # do stuff
Sorry, that should have read "product(xrange(n_syms), repeat=levels)". The
repeat argument is keyword-only.
--
http://mail.python.org/mailman/listinfo/python-
Neal Becker wrote:
> I know this should be a fairly basic question, but I'm drawing a blank.
>
> I have code that looks like:
>
> for s0 in xrange (n_syms):
> for s1 in xrange (n_syms):
> for s2 in xrange (n_syms):
> for s3 in xrange (n_syms):
>
Neal Becker wrote:
> I know this should be a fairly basic question, but I'm drawing a blank.
>
> I have code that looks like:
>
> for s0 in xrange (n_syms):
> for s1 in xrange (n_syms):
> for s2 in xrange (n_syms):
> for s3 in xrange (n_syms):
>
On Fri, Sep 28, 2012 at 8:39 AM, Neal Becker wrote:
> I know this should be a fairly basic question, but I'm drawing a blank.
>
> I have code that looks like:
>
> for s0 in xrange (n_syms):
> for s1 in xrange (n_syms):
> for s2 in xrange (n_syms):
> for s3 in
On 09/28/12 09:39, Neal Becker wrote:
> I know this should be a fairly basic question, but I'm drawing a blank.
>
> I have code that looks like:
>
> for s0 in xrange (n_syms):
> for s1 in xrange (n_syms):
> for s2 in xrange (n_syms):
> for s3 in xrange (n_sy
On 2012-09-28 16:39, Neal Becker wrote:
I know this should be a fairly basic question, but I'm drawing a blank.
I have code that looks like:
for s0 in xrange (n_syms):
for s1 in xrange (n_syms):
for s2 in xrange (n_syms):
for s3 in xrange (n_syms):
W dniu 2012-09-28 16:42, Alister pisze:
On Fri, 28 Sep 2012 10:39:32 -0400, Neal Becker wrote:
I know this should be a fairly basic question, but I'm drawing a blank.
I have code that looks like:
for s0 in xrange (n_syms):
for s1 in xrange (n_syms):
for s2 in xrange (
On Fri, 28 Sep 2012 10:39:32 -0400, Neal Becker wrote:
> I know this should be a fairly basic question, but I'm drawing a blank.
>
> I have code that looks like:
>
> for s0 in xrange (n_syms):
> for s1 in xrange (n_syms):
> for s2 in xrange (n_syms):
> for
11 matches
Mail list logo