#8860: incoherent types for real numbers
--------------------------------+-------------------------------------------
   Reporter:  zimmerma          |       Owner:  AlexGhitza
       Type:  defect            |      Status:  new       
   Priority:  minor             |   Milestone:            
  Component:  basic arithmetic  |    Keywords:            
     Author:                    |    Upstream:  N/A       
   Reviewer:                    |      Merged:            
Work_issues:                    |  
--------------------------------+-------------------------------------------

Comment(by jason):

 Replying to [comment:2 zimmerma]:
 > Jason,
 >
 > > The docstring for RealLiteral? indicates...
 >
 > how do you get this docstring?
 > {{{
 > sage: RealLiteral?
 > Object `RealLiteral` not found.
 > }}}


 I was browsing the source.  Since RealLiteral is not imported to the
 global namespace (i.e., it appears to be only a preparser thing), you
 can't get the docstring just by typing RealLiteral?.  For me, it seems
 like I can't even get the docstring with the full namespace path.  Can you
 try {{{sage.rings.real_mpfr.RealLiteral?}}}


 >
 > Anyway, I find it quite disturbing from the user point-of-view to see
 this "preparsing" side-effect:
 > {{{
 > sage: type(n(1.2,prec=52))
 > <type 'sage.rings.real_mpfr.RealNumber'>
 > sage: type(n(1.2,prec=53))
 > <type 'sage.rings.real_mpfr.RealLiteral'>
 > sage: type(n(1.2,prec=54))
 > <type 'sage.rings.real_mpfr.RealNumber'>
 > }}}

 I guess the underlying question is: why does the preparser have a special
 type (i.e., subclass) of RealNumber that it creates, instead of just
 creating a RealNumber?  That question probably deserves a post to sage-
 devel, since it's not immediately clear from the documentation.

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

Reply via email to