Skip to content
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

corrected overload to multiple dispatch and multimethod #42

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ When decorating a function it:
- annotates the function with the special kwarg `is_overload=True`
- gets the function's name using `pyoload.get_name` and if needed
creates a new dictionarry value in
`pyoload.__overloads__[name]` where it stores all overloads and stores a copy in
`pyoload.__overloads__[name]` where it stores all ~~overloads~~dispatches and stores a copy in
the function's `.__pyod_overloads__` attribute.

And on each call it simply loops through each function entry, while
it catches a `pyoload.InternalAnnotationError` which is raised when
the special `is_overload` is set to true

> [!TIP]
> you may raise `pyoload.InternalAnnotationError` inside an overloaded
function after carrying out some other checks and pyoload will switch to the
> you may raise `pyoload.InternalAnnotationError` inside ~~an overloaded
function~~a multimethod after carrying out some other checks and pyoload will switch to the
next oveload.

```python
Expand Down
Loading