This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gregory.p.smith
Recipients gregory.p.smith, serhiy.storchaka
Date 2021-05-01.23:52:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619913126.24.0.371979011955.issue44003@roundup.psfhosted.org>
In-reply-to
Content
That was anecdotal evidence:

```
Python 3.9.1 (v3.9.1:1e5d33e9b9, Dec  7 2020, 12:10:52) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def func(arg=1, *, kwarg=2): pass
... 
>>> import functools
>>> from functools import lru_cache, update_wrapper
>>> @lru_cache
... def cached_func(arg=1, *, kwargs=2): pass
... 
>>> def x(*args, **kwargs): func(*args, **kwargs)
... 
>>> updated_x = update_wrapper(func, x)
>>> x
<function x at 0x7feff5892b80>
>>> updated_x
<function x at 0x7feff5828a60>
>>> updated_x.__defaults__
(1,)
>>> updated_x.__kwdefaults__
{'kwarg': 2}
>>> func.__defaults__
(1,)
>>> func.__kwdefaults__
{'kwarg': 2}
>>> cached_func.__defaults__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'functools._lru_cache_wrapper' object has no attribute '__defaults__'
>>> cached_func.__kwdefaults__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'functools._lru_cache_wrapper' object has no attribute '__kwdefaults__'
```
History
Date User Action Args
2021-05-01 23:52:06gregory.p.smithsetrecipients: + gregory.p.smith, serhiy.storchaka
2021-05-01 23:52:06gregory.p.smithsetmessageid: <1619913126.24.0.371979011955.issue44003@roundup.psfhosted.org>
2021-05-01 23:52:06gregory.p.smithlinkissue44003 messages
2021-05-01 23:52:06gregory.p.smithcreate