On Friday, October 7, 2016 at 10:47:55 AM UTC-7, John H Palmieri wrote:
>
> TypeError: Error when calling the metaclass bases
>     metaclass conflict: the metaclass of a derived class must be a 
> (non-strict) subclass of the metaclasses of all its bases
>
Yes, python doesn't support multiple metaclass inheritance (its design 
really prevents it), so I'd think this is a hard obstruction.

sage: M=UniqueRepresentation.__metaclass__
sage: M.mro(M)
[<type 'sage.misc.classcall_metaclass.ClasscallMetaclass'>,
 <type 'sage.misc.nested_class.NestedClassMetaclass'>,
 <type 'type'>,
 <type 'object'>]
sage: E=Element.__getmetaclass__(1)
sage: E.mro(E)
[<type 'sage.misc.inherit_comparison.InheritComparisonMetaclass'>,
 <type 'type'>,
 <type 'object'>]

prior to https://trac.sagemath.org/ticket/18329 your example worked.

Of course, if you want UniqueRepresentation (do you really want that? it's 
got a lot of drawbacks) you wouldn't really care about inheriting 
comparison, but that doesn't help you.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to