#12940: Combinatorial implementation of the affine symmetric group
---------------------------------------------------------+------------------
Reporter: sdenton | Owner: tom
denton
Type: enhancement | Status:
needs_work
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:49 sdenton]:
> If this is the accepted usage of asserts vs ValueErrors in Sage, they
should be written up as such in the developer's guide; there wasn't any
way for me to know this was the local convention.
It's not a local convention, it is a general convention independent of
Sage or Python. I think you will find that
[http://en.wikipedia.org/wiki/Assertion_(software_development)#Comparison_with_error_handling]
mostly agrees with me.
> After all, user input IS code in Sage!
I don't understand what you mean with this.
> It's a very, very different situation from taking user input from, say,
a web form and getting an Assertion Error.
Why? What makes calling `AffinePermutationGroup()` so different from
filling in a web form?
> I have, as a user, definitely used statements like
``X._test_whatever()``, which, as you say, are fine to have assert
statements.
Underscored methods are supposed to be private, so you're expected to know
what you're doing. Everything I said applies to using public, documented
functions. Of course, everything can happen if you mess with internal data
structures.
> It's not a bug in my code if buggy input fails to run.
That's perhaps a matter of opinion. Would you find it a bug in the `rm`
command if it crashed with a Segmentation Fault if the file could not be
found? Would you find it a bug in your web browser if it crashed every
time you fill in a non-existing URL?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12940#comment:50>
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.