Weird inheritance with metaclasses
问题 I'm experiencing some really weird problems in Python when trying to inherit from a class with a metaclass. I have this: class NotifierMetaclass(type): def __new__(cls, name, bases, dct): attrs = ((name, value) for name, value in dct.items() if not name.startswith('__')) def wrap_method(meth): return instance_wrapper()(meth) # instance_wrapper is a decorator of my own def is_callable(value): return hasattr(value, '__call__') decorated_meth = dict( (name, value) if not is_callable(value) else