There's some_object.some_method.func_defaults and
some_function.func_defaults both are a settable attribute. How to set
the methods func_defaults? You'd have to have code in
_getattribute__(yourmethod) if not __getattr__(yourmethod)

def __getattribute__(self, attr):
    if attr == self.my_method:
        # something like this, but i'm probably a little off
        # you might need to use super or something to prevent
recursive __getattribute__ calls here
        self.my_method.func_defaults = self.foo

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to