Skip to content

Commit d3f8eb7

Browse files
committed
Mention that take_while can take a type guard in the docs
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent f46c9b3 commit d3f8eb7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/frequenz/channels/_receiver.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@
7676
[`take_while()`][frequenz.channels.Receiver.take_while] returns a new full receiver, so
7777
you can use it in any of the ways described above.
7878
79+
[`take_while()`][frequenz.channels.Receiver.take_while] can even receive a
80+
[type guard][typing.TypeGuard] as the predicate to narrow the type of the received
81+
messages.
82+
7983
# Error Handling
8084
8185
!!! Tip inline end

0 commit comments

Comments
 (0)