#8821: Adding a section on coercion to the tutorial (guided tour)
-----------------------------+----------------------------------------------
Reporter: SimonKing | Owner: mvngu
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.4.1
Component: documentation | Keywords: tutorial coercion
Author: Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Comment(by robertwb):
Looks good, and is much needed. I haven't finished reading it, but I have
some comments:
First, I might focus less on the types and isinstance corresponding to
mathematical categories, as they can be misleading. For example, univarite
polynomials are instances of PrincipalIdealDomainElement, even if they
are. Another example, testing for RingElement could be deceptive. At least
one of
{{{
sage: isinstance(matrix(ZZ, 2), RingElement)
True
sage: isinstance(matrix(ZZ, 2,3), RingElement)
True
}}}
is False. (I consider the first a bug.)
Second, we don't want to create the expectation that Python elements are
unique, as they usually aren't:
{{{
sage: a = -15r
sage: b = -15r
sage: a is b
False
}}}
Only some really common integers are.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8821#comment:2>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.