#19497: Improve comparison framework
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.10
Component: cython | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/improve_comparison_framework|
2497282901353b174fc8d290be0532c3874d4952
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
Replying to [comment:10 vdelecroix]:
> `PyInt_CheckExact` is faster than `PyInt_Check`...
Both are equally fast (and very fast).
> Do we really want to consider a thing inhering from `int` as an `int` in
a comparison?
I guess so, since it will be converted to an `Integer` anyway by the
coercion framework. So, the `instance()` check is really just a fast path
for that.
> Do you have a usecase that would help to decide?
I don't have a particular use-case. However, given the comments above, I
think that `isinstance()` is the right thing to do.
--
Ticket URL: <http://trac.sagemath.org/ticket/19497#comment:11>
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.