You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a feeling that the docs for overloading could be made easier on the eyes and easier to grasp for first-time readers if they didn't use __getitem__ as the main example. Overloading is quite useful for non-dunder methods and functions!
The text was updated successfully, but these errors were encountered:
This pull request:
1. Moves documentation about overloads into the "More types" section.
(Rationale: although overloads aren't really a type, I feel it
makes sense for them to live somewhere in the "Type System
Reference" section instead of the "Miscellaneous" section.)
2. Modifies the docs to start with a non-dunder example (resolvespython#4579) and simplifies the
`__dunder__` example.
3. Adds some documentation about the "pick the first match" rule.
4. Removes the now out-of-date note about erasure.
This pull request overhauls the overloads documentation to reflect the
new change in semantics. Specific changes made:
1. Moves documentation about overloads into the "Type System
Reference" section -- specifically, in the "More types" page.
2. Modifies the docs to start with a non-dunder example (resolves#4579) and simplifies the
`__dunder__` example.
3. Adds documentation about specific checks mypy will perform: in
particular, the "no-shadowing" and "no unsafe variant" definition
checks.
4. Documents the new "pick the first match" rule.
5. Removes the now out-of-date note about erasure.
I've got a feeling that the docs for overloading could be made easier on the eyes and easier to grasp for first-time readers if they didn't use
__getitem__
as the main example. Overloading is quite useful for non-dunder methods and functions!The text was updated successfully, but these errors were encountered: