On 2016-10-10 10:47, Simon King wrote:
The meta-metaclass would take the
atomic metaclasses appearing in the bases of a class definition "Foo",
and would automatically/dynamically create a composed metaclass, that
combines all the features of the given atomic metaclasses and would
serve as the metaclass of the resulting class "Foo".
I have tried that. It is possible in Python 2 but (as far as I know) not
in Python 3. In Python 2, when doing
class X(B1, ..., Bn)
The metaclass of B1 is responsible for constructing the class X (in
particular, the metaclass of B1 can decide the metaclass of X). In
Python 3, the metaclass of X is resolved by a hard-coded algorithm
_PyType_CalculateMetaclass and then that metaclass constructs the class X.
Of course, all this is completely undocumented.
Jeroen.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.