Changes between Version 1 and Version 2 of Ticket #25068, comment 21


Ignore:
Timestamp:
Sep 30, 2015, 1:44:43 PM (9 years ago)
Author:
kosz85

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25068, comment 21

    v1 v2  
    1515But when mA is custom and mB is custom, he don't know what to do, and there are even worse scenarios, there may be 3 or more bases to inherit from. Then standard response is to manually build mC that inherit from mA and mB (like in normal class inheritance).
    1616
    17 So what is doing this patch is reacting to that `TypeError`, and constructing (it's normal factory) such custom metaclass from metaclasses that are used in bases of this class. That new metaclass is used then to create object, instead of standard type. So no magic ;) The only magic is factory and populating metaclasses from bases.
     17So what is doing this patch is reacting to that `TypeError`, and constructing (it's normal factory) such custom metaclass from metaclasses that are used in bases of this class. That new metaclass is used then to create object, instead of standard type. So no magic ;) The only magic is simple factory that populates metaclasses from bases.
Back to Top