#71: Secret translation of .sage to .py causes confusion
-------------------------------------------+----------------------------
       Reporter:  Justin Walker (justin@…  |        Owner:  cwitty
           Type:  enhancement              |       Status:  new
       Priority:  minor                    |    Milestone:  sage-feature
      Component:  misc                     |   Resolution:
       Keywords:                           |    Merged in:
        Authors:                           |    Reviewers:
Report Upstream:  N/A                      |  Work issues:
         Branch:                           |       Commit:
   Dependencies:                           |     Stopgaps:
-------------------------------------------+----------------------------
Description changed by jdemeyer:

Old description:

> When a .sage file is "load"ed or "attach"ed, it gets translated to a .py
> file before being processed; the result is a file with different
> structure than the original.  Any errors are described in terms of the
> .py file, not the .sage file.  I realize this is a kind of Catch-22, but
> is there a way to (as the C preprocessor does) keep the .sage line
> numbers?
>
> Of course this requires that Python have that ability, because it reports
> the errors.
>
> I suppose the proper solution, given this, is to document the issue.
>
> I think this points up an aspect of a fundamental issue: SAGE is a
> programming language/system; SAGE is a computer system for mathematicians
> to use.  I'm not sure how good it can be at both.

New description:

 When a .sage file is "load"ed or "attach"ed, it gets translated to a .py
 file before being processed; the result is a file with different structure
 than the original.  Any errors are described in terms of the .py file, not
 the .sage file.

 One possible solution would be to add a custom `excepthook` which
 translates the exception traceback from to `.py` file to the `.sage` file.

--

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