#19351: Optimize initialization of RealIntervalFieldElement
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.9
      Component:  basic arithmetic   |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Jeroen Demeyer     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jdemeyer/ticket/19351            |  40ff5697119f0e9e425dabd195395ac18e41dbc1
   Dependencies:  #19330             |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by mmezzarobba):

 Not a bug introduced here, but since you are cleaning up this code: I
 think
 {{{
        elif isinstance(x, str):
            s = str(x).replace('..', ',').replace('
 ','').replace('+infinity', '@inf@').replace('-infinity','-@inf@')
            if mpfi_set_str(self.value, s, base):
                raise TypeError("unable to convert {!r} to real
 interval".format(x))
 }}}
 should be
 {{{
        elif isinstance(x, basestring):
            ...
 }}}
 or at least
 {{{
        elif isinstance(x, (str, unicode)):
            ...
 }}}

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