#14982: When a parent is equipped with an embedding, consider coercions that 
don't
go through the embedding
-------------------------------------+-------------------------------------
       Reporter:  mmezzarobba        |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  coercion           |   Resolution:
       Keywords:  embedding          |    Merged in:
        Authors:  Marc Mezzarobba    |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/mmezzarobba/14982-coerce_embeddings|  
4b55415e1dd476e6010fb82b174d5fa455f963bd
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by mmezzarobba):

 Replying to [comment:46 vdelecroix]:
 > I fixed the `q_binomial` issue (see the commit on top `public/14982`,
 WARNING: it is merged with 6.7.beta2).

 Thanks, your fix is much better than what I did (even though the
 particular issue would probably have been solved by the ticket about `I`).
 Just one question: why are you doing
 {{{
     try:
         zero = R.zero()
     except AttributeError:
         zero = R(0)
     try:
         one = R.one()
     except AttributeError:
         one = R(1)
 }}}
 instead of just
 {{{
     zero = R(0)
     one = R(1)
 }}}
 (Are there cases where `R.zero()` would work but not `R(0)`? Or is it
 faster that way when `R` is a `Parent`, despite the `try`/`catch` block?
 And then, does speed matter?)

 > If you like it just cherry-pick it on top of your branch.

 I guess I will even rebase the whole thing and merge related commits when
 we're done talking about it.

 > I actually found another bug:
 > {{{
 > sage: Sym = SymmetricFunctions(QQ)
 > sage: s = Sym.schur()
 > sage: 1 - s[2]
 > s[] - s[2]
 > sage: 1r - s[2]
 > Traceback (most recent call last):
 > ...
 > TypeError: unsupported operand type(s) for -: 'int' and
 > 'SymmetricFunctionAlgebra_schur_with_category.element_class'
 > }}}

 But this example already didn't work before this ticket, did it?

--
Ticket URL: <http://trac.sagemath.org/ticket/14982#comment:48>
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.

Reply via email to