#9363: load bug when last line of file begins with #
----------------------------+-----------------------------------------------
Reporter: mariah | Owner: somebody
Type: defect | Status: new
Priority: minor | Milestone: sage-4.5
Component: misc | Keywords:
Author: Mariah Lenox | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
----------------------------+-----------------------------------------------
{{{
Consider the following files and what sage
does with each when they are loaded:
---- foo1.sage ------
def add(a,b):
return a+b
------------------------
--- foo2.py---
def add(a,b):
return a+b
# this is a comment
---------------------
--- foo3.sage---
def add(a,b):
return a+b
# this is a comment
---------------------
eno% ./sage
----------------------------------------------------------------------
| Sage Version 4.4.4, Release Date: 2010-06-23 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: load "foo1.sage"
sage: load "foo2.py"
sage: load "foo3.sage"
------------------------------------------------------------
File "<string>", line 3
# this is a comment
^
SyntaxError: invalid syntax
sage:
Is the inability to load foo3.sage a bug or a feature?
According to William Stein:
> It's a bug. Please make a trac ticket for this.
> Note that adding a newline to the end of the file is enough to
> fix the problem...
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9363>
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.