Hi Jeroen,

On 2016-10-10, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote:
> 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.

Seriously? That's a regression. Having single-purpose metaclasses that
can smoothly blend would have been a nice feature.

Best regards,
Simon

-- 
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