Changes between Version 1 and Version 2 of Ticket #25068, comment 21
- Timestamp:
- Sep 30, 2015, 1:44:43 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25068, comment 21
v1 v2 15 15 But 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). 16 16 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 populatingmetaclasses from bases.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 simple factory that populates metaclasses from bases.