On Sat, Apr 21, 2012 at 02:41:26PM +0000, Simon King wrote: > But one could argue that "explicit is better than implicit". If we just > see a finite number of applications, then explicitly programming these > finitely many instances may be easier to understand than a general > framework for an infinity of applications.
We are on the same line ... So the question is how many metaclasses we forsee in the future. NestedClassMetaclass is really a workaround for a mishandling of nested classes by Python; we could hope that it would eventually become unneeded. ClasscallMetaclass implements the analogue of special methods but for classes; that's fairly natural, and it is thinkable that they would eventually end up in the type class. DynamicMetaclass is only there for pickling; it's actually fairly similar to ClasscallMetaclass: implementing the special method __reduce__ for a class; we could have a __classreduce__ in type. Ok, maybe all of the above is just a dream; still at this point I see no strong rationale for the existence of those three metaclasses (beside that have no practical alternatives at this point) Do you foresee other use cases for metaclasses in Sage? Cheers, Nicolas -- Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net> http://Nicolas.Thiery.name/ -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To post to this group, send email to sage-combinat-devel@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.