Hi all,

I am trying to implement a Parent in the category of 
FiniteEnumeratedSets().Facade(). My hope was to have the finite enumerated 
sets be represented by `Bitset 
<https://doc.sagemath.org/html/en/reference/data_structures/sage/data_structures/bitset.html#sage.data_structures.bitset.Bitset>`s.
 
Upon testing, I get the error: TypeError: Cannot convert 
sage.data_structures.bitset.Bitset to sage.structure.element.Element. I 
also get the same error when I set facade=True in the Parent.__init__ call. 
I think this behavior makes sense because (as I understand it) the facade 
elements should be elements of *some* parent, just not the parent `self`. 
On the other hand, Bitsets are not an element of any parent.

Does anyone have advice on how to proceed? I can think of a few options:

- Make Bitsets an Element. This doesn't seem desirable because Bitsets is 
Cythonized, and as I understand it, Cython doesn't play nice with the 
Parent/Element framework (please correct me if I misunderstand).

- Make an Element class for my Parent which inherits from both element and 
Bitset. This doesn't seem desirable because I want my parent to be in 
FiniteEnumeratedSets().Facade().

I don't like either of those options, does anyone have suggestions on what 
else I could do?

Thanks so much!

-Trevor


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/39db7e44-2349-414f-9c0f-4f766c3c10e5n%40googlegroups.com.

Reply via email to