On Sunday, 10 February 2013 03:37:01 UTC+11, Simon King wrote:
>
> Hi Anne, 
>
> On 2013-02-09, Anne Schilling <an...@math.ucdavis.edu <javascript:>> 
> wrote: 
> >> Please let me know if you think this is not a bug. If the consensus is 
> that this is a bug the I will open a ticket and post a patch sometime next 
> week. 
> > 
> > Yes, this looks like a bug. 
>
> I don't think so. A ValueError should be raised on wrong values of the 
> right type, and a TypeError should be raised on arguments of wrong type. 
> This is the case here, and this is also the case in many other 
> occasions, such as: 
>   sage: P.<x,y> = ZZ[] 
>   sage: P(1/2) 
>   Traceback (most recent call last): 
>   ... 
>   TypeError: Could not find a mapping of the passed element to this ring. 
>
> So, no bug, but a behaviour that is consistent with the rest of Sage. 
>
>
I misdescribed how I came across the error. It is:

sage: 1 in Tableaux()
Traceback (most recent call last) 
...
TypeError: 'sage.rings.integer.Integer' object is not iterable

which I think is definitely a bug.

Simon is saying above that this is not a bug in CombinatorialObject because 
a TypeError is the right error to raise, but I think that this misses the 
point: I think that CombinatorialObject should raise an error when it gets 
bad input rather than letting something else fail later as a consequence. 
Whether it should raise a TypeError or a ValueError is a separate issue.

Cheers,
Andrew

ps. Blizzards nothwithstanding, I hope to be in ICERM. My plane leaves 
later today:)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to