> I wonder if there is a reason for this. Do the additions break the
> lexeme or is there a syntactic ambiguity...

William or Mike H. would know for sure, but I believe the additions
are all invalid Python which happen to be convenient mathematics :)

> > And using the preparse() command to find out how Sage
> > "really" constructs the ring will still be helpful for creating a Sage
> > library Python file.
>
> Hmm. So sage library files are all in python. This is going to be
> difficult to explain....
>
> So presumably when constructing polynomials you need to use ** instead
> of ^, but it does *not* mean you can't use all the nice _functions_
> Sage provides for handling polynomials. That is not what is meant by
> Sage only accepts pure python from a .py file (which Sage library
> files are). It merely means that some nice syntactical sugar, such as
> R.<x,y,x> and ZZ[] and ^  aren't available in .py files. You can still
> use those things, you just have to type them in a slightly different
> way that is "valid python" (though python.exe wouldn't accept them
> without quite a bit of setting up.....)
>

Yup, I guess.  I don't know anything about python.exe - we're talking
now about files that would be included in the Sage library.


> > from sage.rings.polynomial.polynomial_ring_constructor import
> > PolynomialRing
>
> Well, this is an example of where the source doesn't seem to import
> anything.

?  seems clear to me, but maybe I'm being vague.

> It's also not really clear how you divined that you should
> import PolynomialRing. My guess would have been:
>
> from sage.rings.polynomial import polynomial_ring_constructor

No, because the thing in the preparse output used PolynomialRing,
which then we learned from ? lived in polynomial_ring_constructor.
Though the actual question from that standpoint has already been
answered, I hope.


- kcrisman

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to