Hi Martin!
On Tue, Mar 13, 2012 at 09:53:08AM +0100, Martin Rubey wrote:
> I just noticed that
>
> Partitions(-1).list() # or any negative integer
>
> gives a maximum recursion depth exceeded error. I think it should
> return the empty list, right?
Yeah, or probably simply throw a ValueError?
If yes, you are welcome to create ticket, and post a patch adding a
non-negativity test line 3341 of sage.combinat.partition.py, around:
if isinstance(n, (int,Integer)):
return Partitions_n(n)
else:
raise ValueError, "n must be an integer"
together with an appropriate doctest.
Cheers,
Nicolas
--
Nicolas M. ThiƩry "Isil" <[email protected]>
http://Nicolas.Thiery.name/
--
You received this message because you are subscribed to the Google Groups
"sage-combinat-devel" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-combinat-devel?hl=en.