Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

So, I asked my question just a few minutes too soon. I had two problems: I needed to define the TestRingElement before TestRing, and I needed to specify the Element attribute of TestRing. After the right things are imported, the following code runs:

class TestRingElement(CombinatorialFreeModuleElement):

    def __init__(self, M, x):
        super(TestRingElement, self).__init__(M, x)
        self.data = x

class TestRing(CombinatorialFreeModule):

    Element = TestRingElement

    def __init__(self, R, G):
        super(TestRing, self).__init__(R, G)

I am still curious, though, if anyone can answer my other question about passing in lists to the constructor.

So, I asked my question just a few minutes too soon. I had two problems: I needed to define the TestRingElement before TestRing, and I needed to specify the Element attribute of TestRing. After the right things are imported, the following code runs:runs as expected:

class TestRingElement(CombinatorialFreeModuleElement):

    def __init__(self, M, x):
        super(TestRingElement, self).__init__(M, x)
        self.data = x

class TestRing(CombinatorialFreeModule):

    Element = TestRingElement

    def __init__(self, R, G):
        super(TestRing, self).__init__(R, G)

I am still curious, though, if anyone can answer my other question about passing in lists to the constructor.