Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-morel committed Jun 2, 2024
1 parent 5bb31de commit a1d8ac6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ a typechecker function which typechecks the passed value on each assignment.
It also calls annotate on each of it's methods, except the class has a
`__annotate_norecur__` attribute.

But if the assigned attribute does not yet have annotations, it gets them using
`type(val)` and adds them to the annotations.
Newer from version 1.1.3, pyoload ignores attributes with no annotations and does not check
them.

```python
from pyoload import *
Expand Down Expand Up @@ -76,8 +76,8 @@ 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
> [!TIP]
> you may raise `pyoload.InternalAnnotationError` inside an overloaded
function after carrying out some other checks and pyoload will switch to the
next oveload.

Expand All @@ -95,6 +95,11 @@ def foo_hello(d: dict[str, list[int]]):
...
```

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

## type checking with `pyoload.typeMatch(val, type)`

this function simply finds type compatibility between the passes arguments
Expand All @@ -121,7 +126,7 @@ def foo(a: str):
foo(3.5) # '3.5'
```

### casting recursiion
### casting recursion

Using recursion it supports Generic Aliases of `dict` and builtin iterable
types as `list` and `tuple`.
Expand Down

0 comments on commit a1d8ac6

Please sign in to comment.