Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-morel committed Jun 8, 2024
1 parent 1c6e1f9 commit 16a0d04
Show file tree
Hide file tree
Showing 2 changed files with 2,170 additions and 285 deletions.
34 changes: 18 additions & 16 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,30 @@ Hy pythonista, here is `pyoload`, what is?
It uses the beauty and ease of use of decorators and python scopes to provide
an easy to use tool. here some quick examples.

.. code-block:: python
```python
from pyoload import *
source
@annotate
def greater_than(a: int | float, b: int | float) -> bool:
return a > b
python
from pyoload import *
@multimethod
def foo(a, b=3, c: int = 5):
...
@annotate
def greater_than(a: int | float, b: int | float) -> bool:
return a > b
@multimethod
def foo(a: int, b: Cast(str)):
...
@multimethod
def foo(a, b=3, c: int = 5):
...
@multimethod
def foo(a) -> Cast(str):
return repr(a)
@multimethod
def foo(a: int, b: Cast(str)):
...
foo(4)
```
@multimethod
def foo(a) -> Cast(str):
return repr(a)
foo(4)
* :ref:`genindex`
Expand Down
Loading

0 comments on commit 16a0d04

Please sign in to comment.