Hi Travis, I want this functionality too. I tried adding:
__metaclass__ = ClasscallMetaclass but this produces the error: 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 I found that using __metaclass__ = InheritComparisonClasscallMetaclass works, although I am not yet sure if I need rich comparison. Anyway, apart from this minor quibble about meta classes it seems to be working for now. Cheers, Andrew On Wednesday, 16 March 2016 02:36:31 UTC+11, Travis Scrimshaw wrote: > > Hey Andrew, > Just for reference, you do not need these lines as they are in the > Tableau code so you can call Tableau(...) directly without having to > explicitly create the parent object. > > @staticmethod > def __classcall_private__(cls, elt): > return MyParent().element_class(MyParent(), elt) > > Although considering that the metaclass has not been set to the classcall > metaclass, it should not be called. > > Best, > Travis > > -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.