Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test, add blurb
  • Loading branch information
JelleZijlstra committed May 6, 2024
commit 59310943becad11f336a3f7e1219b4e93b9ee73f
2 changes: 1 addition & 1 deletion Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ def __getattr__(self, attr):
raise AttributeError(attr)

def __setattr__(self, attr, val):
if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams'}:
if _is_dunder(attr) or attr in {'_name', '_inst', '_nparams', '_defaults'}:
super().__setattr__(attr, val)
else:
setattr(self.__origin__, attr, val)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add type parameter defaults to :class:`typing.Generator` and
:class:`typing.AsyncGenerator`.