Skip to content

Commit

Permalink
[readme] formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
apalala committed Nov 12, 2023
1 parent 6584081 commit 9ecbadf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ assert f() == [1]
```


## Working with classes
### Working with classes

**Late** also works with classes and `dataclass`. The ``@latebinding`` decorator
must be the outer one:
Expand All @@ -116,7 +116,7 @@ assert d.x is not c.x
```


## Working with generators
### Working with generators

**Late** allows passing a generator as a default argument value,
and it will provide the next value on each function call. The usefulness of
Expand Down Expand Up @@ -164,7 +164,7 @@ def get_session(uniqueid: int = __(unique_id_generator())) -> Session:
```


## Working with functions
### Working with functions

**Late** also allows lat-binding functions, so the above example could be implemented using
a function instead of a generator:
Expand All @@ -175,7 +175,7 @@ def get_session(uniqueid: int = __(make_unique_id)) -> Session:

The given function will be called once every time the ``uniqueid`` parameter is omitted.

## About name choice
### About name choice

The names of what **Late** exports are chosen to be explicit where it matters, and to not get in
the way of the visuals of a declaration. In particular, ``__()`` was chosen to interfere the least
Expand Down

0 comments on commit 9ecbadf

Please sign in to comment.