mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.12] gh-109818: reprlib.recursive_repr
copies __type_params__
(… (#109999)
[3.12] gh-109818: `reprlib.recursive_repr` copies `__type_params__` (GH-109819).
(cherry picked from commit f65f9e80fe
)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
parent
dd67e59bb1
commit
9be6a11199
3 changed files with 14 additions and 0 deletions
|
@ -29,6 +29,7 @@ def recursive_repr(fillvalue='...'):
|
|||
wrapper.__name__ = getattr(user_function, '__name__')
|
||||
wrapper.__qualname__ = getattr(user_function, '__qualname__')
|
||||
wrapper.__annotations__ = getattr(user_function, '__annotations__', {})
|
||||
wrapper.__type_params__ = getattr(user_function, '__type_params__', ())
|
||||
return wrapper
|
||||
|
||||
return decorating_function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue