#9265: Remove `CombinatorialClass` from sage.combinat.tableau
------------------------------------------------+---------------------------
Reporter: jbandlow | Owner: sage-combinat
Type: enhancement | Status: closed
Priority: major | Milestone: sage-5.4
Component: combinatorics | Resolution: fixed
Keywords: tableaux, combinatorics | Work issues:
Report Upstream: N/A | Reviewers: Andrew
Mathas, Anne Schilling
Authors: Jason Bandlow, Andrew Mathas | Merged in:
sage-5.4.beta0
Dependencies: #5457 | Stopgaps:
------------------------------------------------+---------------------------
Comment (by nthiery):
Hi Jeroen,
Replying to [comment:42 jdemeyer]:
> This patch badly abuses `assert` and `AssertionError`. `assert` should
not be used for control flow. An assert checks something which should
always be true, a failed assertion is always a bug in the program.
>
> For example:
> {{{
> sage: Tableau([[1],[2,3]])
> Traceback (most recent call last):
> ...
> AssertionError: A tableau must be a list of lists of weakly
decreasing length.
> }}}
> This is a simple user mistake, for which `assert` is not right.
>
> I think this must be fixed.
There is no control flow involved. It's quite a common public constructor,
but speed matters because it's used a lot at a low level in combinatorics
calculations. The error message is nice and explicit. Altogether, given
the discussion on sage-devel, do we agree that it's ok as such?
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9265#comment:43>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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-trac?hl=en.