Paul Zimmerman wanted me to post the following from him to this thread:
------- Start of forwarded message -------
Content-Type: text/plain; charset="utf-8"
From: "Sage" <[email protected]>
Cc: [email protected]
Auto-Submitted: auto-generated
Date: Tue, 04 May 2010 14:35:55 -0000
Reply-To: [email protected]
Subject: Re: [Sage] #8860: incoherent types for real numbers
In-Reply-To: <[email protected]>
#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
------- End of forwarded message -------
--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org