The syntax R.<a,b,c> = ... uses the Sage preparser so my guess is that
.pyx files are not preparsed.  If you need this to be in a pyx file
then here an alternative:


R=BooleanPolynomialRing(3, 'abc')
a, b, c = R.gens()
print (a+b+c)*(a+b)
a*c + a + b*c + b


On 19 March 2014 13:30, Prakash Dey <[email protected]> wrote:
> Consider this program (in Ubuntu 12.04 LTS)
>
> #!/usr/bin/sage
> from sage.all import *
> R.<a,b,c>=BooleanPolynomialRing()
> print (a+b+c)*(a+b)
>
> it runs perfectly when run as a .sage file and produces the output
>            a*c + a + b*c +b
>
> but produces the following error when run with .spyx extension.
>
> R.<a,b,c>=BooleanPolynomialRing()
>  ^
> ------------------------------------------------------------
>
> _home_pdey_grain_t_spyx_0.pyx:9:2: Expected an identifier
>
> what is the problem????????
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" 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-support.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" 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-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to