On Sat, 28 Oct 2006 07:15:53 -0500, Bill Hart <[EMAIL PROTECTED]> wrote: > By the way, I think this should work in a similar way if you create a > polynomial ring in multiple variables using MPolynomialRing. > > E.g: > A=MPolynomialRing(QQ,3,'x') > > should inject x1,x2 and x3 into the namespace. This is important from a > consistency point of view, but also because it will be useful to people > who want to define polynomials with many indeterminates (I just met > someone who does this regularly yesterday).
It does now. And (1) you can give an optional argument to avoid it doing that e.g., PolynomialRing(QQ,'x', 3, inject_variables=False) (2) If you have any polynomial ring R at all that came from anywhere, doing R.inject_variables([optional scope]) injects all the variables into the scope. (3) I could make it easy to toggle this behavior by having a function that sets a flag in gens.pyx. In particular, library code should never depend on this if I do that. (Currently library code never uses R.<x,y,z> = .... since that requires the preparser.) > The same applies, I think, to power series rings, unless someone can > think of reasons I haven't thought of, for these to operate > differently. Yes, poly's are just an example. I think this approach should apply to a wide range of types. It really really makes things more usable. I'll setup a sage-devel on sage.math sometime day so people can try it out. William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---