Hi Anne,
> Thanks! I do not understand how to use it though. If I inherit
>
> from sage.structure.list_clone import ClonableIntArray, ClonableElement
>
> and replace
>
> class LinearExtensionOfPoset(CombinatorialObject, Element):
>
> by
>
> class LinearExtensionOfPoset(ClonableIntArray, ClonableElement):
>
> and put
>
> ClonableIntArray.__init__(self, linear_extension)
> ClonableElement.__init__(self, parent)
Since ClonableIntArray inherits from ClonableElement you shouldn't write
both. Just write
class LinearExtensionOfPoset(ClonableIntArray):
Also, you don't need to write an init if your constructor is just taking the
parent and the list of the value.
If you need some other parameters then write your init as
def __init__(self, parent, linear_extension, other_params):
...
ClonableIntArray.__init__(self, parent, linear_extension)
...
> in my _init__ file, then I get a lot of error messages (whereas all tests
> pass before the
> change).
>
> Do I need to replace
>
> Element = LinearExtensionOfPoset
>
> as well by
>
> ClonableElement = LinearExtensionOfPoset?
no !
Element = LinearExtensionOfPoset
is correct.
Florent
--
You received this message because you are subscribed to the Google Groups
"sage-combinat-devel" group.
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-combinat-devel?hl=en.