#17042: Improvement to subsets_with_hereditary_property
-------------------------+-------------------------------------------------
Reporter: | Owner:
ncohen | Status: needs_work
Type: | Milestone: sage-6.4
enhancement | Resolution:
Priority: major | Merged in:
Component: | Reviewers: Dima Pasechnik
combinatorics | Work issues:
Keywords: | Commit:
Authors: | 528ec2fb916ea2bb3ef36ecb2c377fd27dd0ba54
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
u/ncohen/17042 |
Dependencies: |
#16994 |
-------------------------+-------------------------------------------------
Changes (by tscrim):
* status: positive_review => needs_work
Comment:
You shouldn't use `assert` to validate user input:
{{{#!python
assert (maximal_faces is None) or (from_characteristic_function is None)
}}}
as any assertion being raised is supposed to indicate a bug (plus they can
be turned off). Instead raise an error
{{{#!python
if maximal_faces is None and from_characteristic_function is None:
raise ValueError("maximal_faces and from_characteristic_function
cannot both be specified")
}}}
(with perhaps a better error message).
However I do like the speedup of `SimplicialComplex`.
PS - This made me chuckle `:p`:
> I am convinced that it would make me angry.
--
Ticket URL: <http://trac.sagemath.org/ticket/17042#comment:25>
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/d/optout.