Hi John,

> One of the examples in the docstring for DisjointUnionEnumeratedSet
> goes something like this:
> 
> sage: U = DisjointUnionEnumeratedSets(Family(NonNegativeIntegers(),
> Permutations))
> sage: it = iter(U)
> sage: it.next()
> []
> 
> If I try the same thing, replacing "Permutations" with "Partitions",
> it doesn't work:
> 
> sage: U = DisjointUnionEnumeratedSets(Family(NonNegativeIntegers(),
> Partitions))
> sage: it = iter(U)
> sage: it.next()
> ---------------------------------------------------------------------------
> ValueError                                Traceback (most recent call
> [...]
> Is this expected?

I can't reproduce the problem with sage 4.4.2:

tomahawk-~ $ sage
----------------------------------------------------------------------
| Sage Version 4.4.2, Release Date: 2010-05-19                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: U = DisjointUnionEnumeratedSets(Family(NonNegativeIntegers(), Partitions))
sage: it = iter(U)
sage: it.next()
[]
sage: it.next()
[1]
sage: it.next()
[2]
sage: it.next()
[1, 1]
sage: it.next()
[3]
sage: it.next()
[2, 1]
sage: it.next()
[1, 1, 1]
sage: quit
Exiting Sage (CPU time 0m0.12s, Wall time 0m13.00s).

Which version of sage are you using ?

Cheers,

Florent

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to