[ python-Bugs-1576241 ] functools.wraps fails on builtins
SourceForge.net
noreply at sourceforge.net
Fri Oct 13 00:33:50 CEST 2006
Bugs item #1576241, was opened at 2006-10-12 22:24
Message generated for change (Comment added) made by kajiuma
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: Extension Modules
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: kajiuma (kajiuma)
Assigned to: Nobody/Anonymous (nobody)
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: kajiuma (kajiuma)
Date: 2006-10-12 22: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
More information about the Python-bugs-list
mailing list