#18578: Python 3 preparation: Special function __div__() is used no more in Py3
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:  wluebbe
  wluebbe                |       Status:  new
           Type:         |    Milestone:  sage-6.8
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:  misc   |    Reviewers:
       Keywords:         |  Work issues:
  python3                |       Commit:
        Authors:         |  9701674d59213529ef6476ecc973a8f2cf69bfb3
Report Upstream:  N/A    |     Stopgaps:
         Branch:         |
  u/wluebbe/18578        |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by jdemeyer):

 Replying to [comment:9 wluebbe]:
 > Not a complete success :-( . I am going into a never ending recursion:
 > {{{
 >     RuntimeError: maximum recursion depth exceeded while calling a
 Python object
 > **********************************************************************
 > 1 item had failures:
 >    2 of   9 in sage.ext.fast_callable.Expression.__truediv__
 > }}}
 If you look at the traceback, you see why:
 {{{
       File "sage/ext/fast_callable.pyx", line 918, in
 sage.ext.fast_callable.Expression.__div__
 (build/cythonized/sage/ext/fast_callable.c:7203)
         return PyNumber_TrueDivide(self, other)
       File "sage/structure/element.pyx", line 2025, in
 sage.structure.element.RingElement.__truediv__
 (build/cythonized/sage/structure/element.c:18064)
         return self.__div__(right)
       File "sage/structure/element.pyx", line 2038, in
 sage.structure.element.RingElement.__div__
 (build/cythonized/sage/structure/element.c:18205)
         return coercion_model.bin_op(self, right, div)
       File "sage/structure/coerce.pyx", line 1040, in
 sage.structure.coerce.CoercionModel_cache_maps.bin_op
 (build/cythonized/sage/structure/coerce.c:9052)
         res = mul_method(x)
 }}}
 The problem is caused by this code in `element.pyx`:
 {{{
     def __truediv__(self, right):
         # in sage all divs are true
         if not isinstance(self, Element):
             return coercion_model.bin_op(self, right, div)
         return self.__div__(right)
 }}}

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