#12940: Combinatorial implementation of the affine symmetric group
---------------------------------------------------------+------------------
Reporter: sdenton | Owner: tom
denton
Type: enhancement | Status:
needs_review
Priority: minor | Milestone:
sage-5.11
Component: combinatorics | Resolution:
Keywords: affine, combinatorics, days38, days49 | Work issues:
Report Upstream: N/A | Reviewers:
Chris Berg, Anne Schilling
Authors: Tom Denton | Merged in:
Dependencies: #14673, #8392 | Stopgaps:
---------------------------------------------------------+------------------
Comment (by jdemeyer):
Replying to [comment:34 sdenton]:
> Could you point me to a discussion or coding convention on proper ways
to use assert statements or check for input correctness?
This has been discussed before, but I can't find the discussion anymore.
There is some discussion at [http://stackoverflow.com/questions/944592
/best-practice-for-python-assert/945135#945135]
Assertions (and this is not specific to Sage or Python) are internal
checks for code correctness. Don't forget that assertions can be turned
off (run Python with `-O` switch) and you don't want user code to depend
on whether on not assertions are enabled.
I think of assertion failures as serious as a crash due to a Segmentation
Fault: it is always a bug in the program if one occurs.
Most of the assertions in this ticket should be replaced by something of
the form
{{{
if not some_condition:
raise ValueError("some_condition failed")
}}}
or `TypeError` depending on the kind of error.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12940#comment:37>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.