Repository navigation
gh-89263: Add typing.get_overloads #31716
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
Changes from 1 commit
2ee377d
831b565
f03f8a9
404668a
7a5b0d1
6998255
26bb908
f52b757
fc6a925
b524244
e95558e
31fd72d
7041ad3
e26b0db
1bf89fb
83ac432
dfdbdc7
e16c8d0
b3d2227
9727eee
2e374b8
ff03b12
17f0710
2346970
f2053a0
b6131ad
506bd66
e9a2100
2b1a5cc
103bfd4
d453f7f
450afeb
ea62287
905253c
debbf8a
754c134
1ad8224
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2419,9 +2419,10 @@ Functions and decorators | |||||
| overloaded function. For example, given the definition of ``process`` in | ||||||
| the documentation for :func:`@overload <overload>`, | ||||||
| ``get_overloads(process)`` will return a sequence of three function objects | ||||||
| for the three defined overloads. | ||||||
| for the three defined overloads. If called on a function with no overloads, | ||||||
| ``get_overloads`` returns an empty sequence. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Tiny nit -- this paragraph starts off using the imperative mood
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But the previous sentence is in the indicative, so I think this is fine?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, it's not really a big deal either way :) |
||||||
|
|
||||||
| This function can be used for introspecting an overloaded function at | ||||||
| ``get_overloads`` can be used for introspecting an overloaded function at | ||||||
| runtime. | ||||||
|
JelleZijlstra marked this conversation as resolved.
|
||||||
|
|
||||||
| .. versionadded:: 3.11 | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence sounds quite strange to me:
But I'm not sure I have a better suggestion off the top of my head ://
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, unfortunately the
overloaddocs don't have a clear term for the implementation function either.