Dont' know where are you going with that but if what you need is
cancelling some attributes when inheriting then probably this is a
cleaner approach:
class Meta(type):
def __init__(cls, name, bases, dic):
def attributeError(*_):
raise AttributeError
for base in bases:
kyo guan wrote:
> How to Adding Functionality to a Class by metaclass(not by inherit)
>
[snip]
>
> class MetaFoo(type):
> def __init__(cls, name, bases, dic):
> super(MetaFoo, cls).__init__(name, bases, dic)
>
> for n, f in inspect.ge