Re: [Python-Dev] update_wrapper should preserve staticmethod behavior

2008-06-12 Thread Nick Coghlan
Calvin Spealman wrote: I'd like to make a claim about the following example, that update_wrapper should be improved to preserve the behavior of known, built-in decorators. In this case, I'm talking about staticmethod. The order I list here feels natural, but it obviously doesn't work. The only

Re: [Python-Dev] update_wrapper should preserve staticmethod behavior

2008-06-11 Thread Guido van Rossum
On Wed, Jun 11, 2008 at 12:22 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > Calvin Spealman socialserve.com> writes: >> >> staticmethod doesn't wrap anything, it just creates a descriptor on >> the class with a __get__ that returns the original, untouched >> callable. Doesn't even care _what_ th

Re: [Python-Dev] update_wrapper should preserve staticmethod behavior

2008-06-11 Thread Calvin Spealman
staticmethod doesn't wrap anything, it just creates a descriptor on the class with a __get__ that returns the original, untouched callable. Doesn't even care _what_ the thing you use it on is (function, other callable, or something else entirely.) This actually shouldn't be attempted on non

Re: [Python-Dev] update_wrapper should preserve staticmethod behavior

2008-06-11 Thread Guido van Rossum
Please submit a fix to the issue tracker at bugs.python.org if you care about this. On Wed, Jun 11, 2008 at 7:06 AM, Calvin Spealman <[EMAIL PROTECTED]> wrote: > I'd like to make a claim about the following example, that update_wrapper > should be improved to preserve the behavior of known, built-