On Fri, Nov 09, 2012 at 12:26:11PM -0800, Volker Braun wrote:
>You can do this:
>class MyElement(Element):
>def is_regular(self):
>from sage.my_parent import MyParent
>P = MyParent()
>That way you don't import MyParent when you import the element, only wh
You can do this:
class MyElement(Element):
def is_regular(self):
from sage.my_parent import MyParent
P = MyParent()
That way you don't import MyParent when you import the element, only when
you run the is_regular() method.
Alternatively, the parent could have an is_regular(x
On Nov 9, 2012, at 7:57 PM, Volker Braun wrote:
> If you use the
>
> class MyParent(Parent)
> Element = MyElement
>
> syntax then you have to import MyElement. So you shouldn't import MyParent in
> your element code or you will create a cyclic import (=bad).
>
> Are you sure that you need
Hi,
Why does adding :
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
at the beginning of quotient_ring_element.py create the weird error:
Traceback (most recent call last):
…
AttributeError: 'module' object has no attribute 'quotient_ring'
Is there a circular dep