Bugs item #1576241, was opened at 2006-10-12 18:24 Message generated for change (Comment added) made by akuchling You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1576241&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: kajiuma (kajiuma) >Assigned to: Nick Coghlan (ncoghlan) Summary: functools.wraps fails on builtins Initial Comment: functools.wraps assumes that the wrapped function has a __dict__ attribute, which is not true for builtins. The attached patch provides an empty dictionaries for functions that do not have the required attributes. This will cause programs expecting an AttributeError (if there are any) to fail. ---------------------------------------------------------------------- >Comment By: A.M. Kuchling (akuchling) Date: 2006-10-26 15:18 Message: Logged In: YES user_id=11375 The change seems reasonable, but arguably this is an API change because of the AttributeError no longer being raised. Nick, do you want to decide whether to make this change or not? (I can make the edit and add a test if you agree to apply this change.) ---------------------------------------------------------------------- Comment By: kajiuma (kajiuma) Date: 2006-10-12 18:33 Message: Logged In: YES user_id=1619773 Looks like lynx cannot send files. The patch changed: getattr(wrapped, attr) to: getattr(wrapped, attr, {}) At then end of line 35 of Lib/functools.py ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1576241&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com