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:
       for dont in base.privates:
         setattr(cls,dont,attributeError) #override private methods

class Foo(object):
   privates=('f',)
   def f(self):
     pass
   def g(self):
     pass

class Bar(Foo):
   __metaclass__ = Meta

b=Bar()
b.g()
b.f()

and it implies writing only one metaclass.


        

        
                
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to