On Fri, Mar 7, 2008 at 8:47 PM, Anthony Tolle <[EMAIL PROTECTED]> wrote: > Let me put it this way: if unbound methods are gone for good, then I > think it would nice to develop some guidance on checking the signature > of callable objects, to enable decorators to play nice with each > other--especially if they intend to modify the argument list. [snip] > For a static method: > return self.callable(newarg, *args, **kwargs) > > For an instance method with instance binding (i.e. a bound method): > return self.callable(newarg, *args, **kwargs) > > For an instance method with class binding (i.e. an unbound method): > return self.callable(args[0], newarg, args[1:], **kwargs)
Why is it so crucial that "self" is the first argument? If I use a decorator that adds a new element to the beginning of the argument list, I wouldn't be surprised that I now have to write my methods as:: @add_initial_argument def method(new_arg, self, ...): ... Steve -- I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a tiny blip on the distant coast of sanity. --- Bucky Katt, Get Fuzzy _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com