#18159: cardinality must output Infinty or a Sage integer
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: enhancement | Status: new
Priority: critical | Milestone: sage-6.6
Component: categories | Resolution:
Keywords: | Merged in:
Authors: Vincent Delecroix | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/18159 | e40975a50978d76bf1c8ad4a141470dc0b010289
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by ncohen):
> It is not sufficient. '''You''' were arguing that Python ints were
better because faster. I just showed you that it is not completely right.
An argument for `X` is generally not an argument for `Y`.
All I wanted to point out is that *sometimes* an int is better than an
Integer, and that for this reason they should not be forbidden. I do not
mean to say that a Python int is always better than a Sage Integer, and
quite clearly it is not the case: ints overflows, Integers do not.
> The reason to oblige people to return Sage integers or Infinity in the
method `.cardinality` of a `Parent` is mostly for consistency.
Couldn't we just use the `TestSuite` to detect errors? When you see a non-
integer then something is most probably wrong and the testsuite should
report it. What you are doing right now is simulate a "return type" for a
function in a language that does not support it.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/18159#comment:22>
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.