> I was wondering if there is some simpler way of building
parameterized
> metaclasses ?
Why not just a function returning metaclasses?
def metaFactory(*args):
dic =
return type("somemetaclass", (type,), dic)
Alternatively, a metaclass classmethod returning a metaclass, so that
you can use some
Hi,
I've been looking at writing parameterized metaclasses and here are the
two solutions I've come to:
(my goal was to build a way to automatically add a hash function that
would take into account a selected list of object attributes)
1. all-in-one metametaclass:
class Autohash2(type):
"""