8000 PEP 692: Introduce proposed enhancements and expand Motivation section by franekmagiera · Pull Request #2732 · python/peps · GitHub
[go: up one dir, main page]

Skip to content

PEP 692: Introduce proposed enhancements and expand Motivation section #2732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Aug 23, 2022
Merged
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 the magic method call explanation
  • Loading branch information
franekmagiera committed Aug 8, 2022
commit d8de2d5a8a5c4323c258637b784b17f307ddbe69
2 changes: 1 addition & 1 deletion pep-0692.rst
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ To accomplish this, we propose a new dunder called ``__typing_unpack__``.
The double asterisk syntax should result in a call to the ``__typing_unpack__``
special method on an object it was used on. This means that at runtime,
``def foo(**kwargs: **T): ...`` is equivalent to
``def foo(**kwargs: T.__typing_unpack__()): ...``.
``def foo(**kwargs: type(T).__typing_unpack__(T)): ...``.
``TypedDict`` is the only type in the standard library that is expected to
implement ``__typing_unpack__``, which should return ``Unpack[self]``.

Expand Down
0