Skip to content

Commit

Permalink
Merge pull request #42 from ken-morel/ken-morel-patch-2
Browse files Browse the repository at this point in the history
corrected overload to multiple dispatch and multimethod
  • Loading branch information
ken-morel committed Jun 4, 2024
2 parents 00c3df6 + 69bb1c1 commit a1bd814
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit a1bd814

Please sign in to comment.