#8386: move iet from sage.combinat to sage.dynamics
------------------------------------------+---------------------------------
Reporter: vdelecroix | Owner: vdelecroix
Type: defect | Status: needs_work
Priority: major | Milestone: sage-5.11
Component: combinatorics | Resolution:
Keywords: iet, combinatorics | Work issues:
Report Upstream: N/A | Reviewers: Vincent Delecroix
Authors: Frédéric Chapoton | Merged in:
Dependencies: #12643, #13677, #14669 | Stopgaps:
------------------------------------------+---------------------------------
Changes (by jdemeyer):
* status: positive_review => needs_work
Comment:
Never use `assert` to check user input, use `raise TypeError()` or other
exceptions for that.
An `AssertionError` appearing in a public function is by definition a bug.
Example:
{{{
sage: QuadraticStratum("foo")
---------------------------------------------------------------------------
AssertionError Traceback (most recent call
last)
<ipython-input-2-ba2d4d1c0bfc> in <module>()
----> 1 QuadraticStratum("foo")
/mazur/release/merger/sage-5.10/local/lib/python2.7/site-
packages/sage/misc/lazy_import.so in
sage.misc.lazy_import.LazyImport.__call__ (sage/misc/lazy_import.c:2475)()
/mazur/release/merger/sage-5.10/local/lib/python2.7/site-
packages/sage/misc/lazy_import.so in
sage.misc.lazy_import.LazyImport.__call__ (sage/misc/lazy_import.c:2475)()
/mazur/release/merger/sage-5.10/local/lib/python2.7/site-
packages/sage/dynamics/flat_surfaces/quadratic_strata.pyc in
__init__(self, *l)
30 else:
31 for i in l:
---> 32 assert(isinstance(i, (int, Integer)))
33 self._zeroes = sorted(list(l), reverse=True)
34
AssertionError:
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8386#comment:39>
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.