On Sun, 05 Nov 2006 13:24:18 -0800, Andrey Novoseltsev  
<[EMAIL PROTECTED]> wrote:

> Dear William,
>
> I believe that I found a bug - SAGE parser does not ignore comments.

You're right.  Justin Walker reported a similar problem recently, so it's
time to fix it!.  Which I've done; the fix will be in the next release
of SAGE (or see the attached patch):

> I had the following code in .sage file
>
> ##########################
> f.readline()    #v[d][i]: sum_j Incidence(i'th dim-d-face, j-th vertex)  
> x 2^j
> ...
>     if lseq[i+1][n-1-j]=='1':
> ...
> f.readline()    #f[d][i]: sum_j Incidence(i'th dim-d-face, j-th facet) x  
> 2^j
> ...
>     if lseq[i+1][n-1-j]=='1':
> ##########################
>
> and the corresponding lines in .py file look like
>
> ##########################
> f.readline()    #v[d][i]: sum_j Incidence(i'th dim-d-face, j-th vertex)  
> x 2^j
> ...
>     if lseq[i+1][n-1-j]=='Integer(1)':
> ...
> f.readline()    #f[d][i]: sum_j Incidence(i'th dim-d-face, j-th facet) x
> Integer(2)**j
> ...
>     if lseq[i+Integer(1)][n-Integer(1)-j]=='1':
> ##########################
>
> So because of the single  '  in the comment it changed my strings and  
> two very
> similar pieces of code worked completely different.
>
> I saved the complete files in my directory on sage.math (user novoselt)  
> as
> bug.sage and bug.py.



--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Attachment: 1780.patch
Description: Binary data

Reply via email to