metaclasses

Customary To Inherit Metaclasses From type?

I have been trying to understand python metaclasses, and so have been going through some sample code. As far as I understand it, a Python metaclass can be any callable. So, I can have my metaclass like def metacls(clsName, bases, atts): .... return type(clsName, bases, atts) However, I have seen a lot of people write their met...

What is Ruby's analog to Python Metaclasses?

Python has the idea of metaclasses that, if I understand correctly, allow you to modify an object of a class at the moment of construction. You are not modifying the class, but instead the object that is to be created then initialized. Python (at least as of 3.0 I believe) also has the idea of class decorators. Again if I understand cor...