[sage-devel] Re: Hm, seemingly wrong bracketing works anyway?

2016-01-26 Thread Eric Gourgoulhon
Quite surprising!
Indeed, one has

sage: preparse("[1..len(a])")
'(ellipsis_range(Integer(1),Ellipsis,len(a)))'

So the culprit seems to be sage preparser.


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Hm, seemingly wrong bracketing works anyway?

2016-01-26 Thread William Stein
On Tue, Jan 26, 2016 at 12:40 PM, Eric Gourgoulhon
 wrote:
> Quite surprising!
> Indeed, one has
>
> sage: preparse("[1..len(a])")
> '(ellipsis_range(Integer(1),Ellipsis,len(a)))'
>
> So the culprit seems to be sage preparser.

The preparser barely "parses" -- it just does some transformations
before the actual parsing happens.  In this case the transformation
changes something that should be invalid syntax (if "the sage
language" had an official specified syntax, which it doesn't) into
something that is valid.  Amusing.

William

>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William (http://wstein.org)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.