Skip to content

Commit 293ea72

Browse files
committed
improve docstring
1 parent 431552c commit 293ea72

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎unpythonic/fploop.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,13 @@ def looped_over(iterable, acc=None): # decorator factory
182182
Like ``@looped``, but the client now gets three positionally passed magic parameters:
183183
184184
`loop`: function
185-
Like in ``@looped``.
185+
Like in ``@looped``, except if called with no args, retains the
186+
current value of ``acc`` and proceeds to the next iteration
187+
(effectively skipping the current ``x``).
188+
189+
If you need to skip an element and still pass custom args to ``loop``,
190+
see ``breakably_looped_over``, which provides a ``cnt`` parameter
191+
which does exactly that.
186192
187193
`x`: anything
188194
The current element.

0 commit comments

Comments
 (0)