Edvin Fuglebakk <[EMAIL PROTECTED]> writes:
> I have written a generator that puzzles me:
>
> The generator is supposed to create ordered selections of a set of
> objects. repetition of objects is allowed and the selections should be
> of a size determined by a pramter to the generator.
>
> Now, i
On Dec 4, 8:00 am, Edvin Fuglebakk <[EMAIL PROTECTED]> wrote:
> I have written a generator that puzzles me:
>
> The generator is supposed to create ordered selections of a set of
> objects. repetition of objects is allowed and the selections should be
> of a size determined by a pramter to the gene
On Dec 4, 8:00 am, Edvin Fuglebakk <[EMAIL PROTECTED]> wrote:
> I have written a generator that puzzles me:
>
> The generator is supposed to create ordered selections of a set of
> objects. repetition of objects is allowed and the selections should be
> of a size determined by a pramter to the gene
On Dec 4, 7:00 am, Edvin Fuglebakk <[EMAIL PROTECTED]> wrote:
...
> def orderedCombinations(pool, k):
> """
> Generator yielding ordered selections of size k with repetition from
> pool.
> """
>
> if k == 1:
> for m in pool:
> yield [m]
>
> if k > 1:
>
>
On Dec 4, 8:00 am, Edvin Fuglebakk <[EMAIL PROTECTED]> wrote:
> I have written a generator that puzzles me:
>
> The generator is supposed to create ordered selections of a set of
> objects. repetition of objects is allowed and the selections should be
> of a size determined by a pramter to the gene