[Python-Dev] update_wrapper should preserve staticmethod behavior (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Wed Jun 11 19:48:54 CEST 2008
- Previous message: [Python-Dev] update_wrapper should preserve staticmethod behavior
- Next message: [Python-Dev] update_wrapper should preserve staticmethod behavior
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Calvin Spealman <ironfroggy socialserve.com> writes:
Traceback (most recent call last): File "", line 1, in File "", line 3, in A File "", line 5, in d File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/functools.py", line 33, in updatewrapper setattr(wrapper, attr, getattr(wrapped, attr)) AttributeError: 'staticmethod' object has no attribute 'module'
Well, if staticmethod doesn't mirror the original function's module attribute, I'd say staticmethod is the culprit.
Since Python grew the update_wrapper function, it seems reasonable to ask that all decorators (or decorator-alikes) provided with Python call update_wrapper. Of course staticmethod is written in C, so is there a C function somewhere providing the same functionality as update_wrapper does?
- Previous message: [Python-Dev] update_wrapper should preserve staticmethod behavior
- Next message: [Python-Dev] update_wrapper should preserve staticmethod behavior
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]