On Mar 19, 2009, at 12:04 AM, Simon King wrote:

> Dear Robert,
>
> On Mar 19, 4:01 am, Robert Bradshaw <[email protected]>
> wrote:
>> I would guess you have a circular import issue going on here when you
>> try to put it in the Sage library. Unfortunately, I don't have an
>> easy solution other than trying to be very careful about what you are
>> importing in your files.
>
> How can a cycle be avoided? Perhaps I could try to import only the
> very essentials at the beginning of the file, and to have the
> remaining import statements only inside the methods. E.g., when I
> construct a polynomial ring in a method ``foo``, I could import ``from
> sage.rings.polynomial.polynomial_ring_constructor import
> PolynomialRing`` there, rather than on module level.

Yes, you could do that.

For example, that you're trying to put these into the  
sage.rings.polynomial.all module, you can't import anything from  
sage.rings.polynomial.all (or anything that indirectly imports from  
there). Currently things are messier than they should be. See, e.g.,  
http://trac.sagemath.org/sage_trac/ticket/4986

- Robert


--~--~---------~--~----~------------~-------~--~----~
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://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to