MCPcopy Create free account
hub / github.com/ZiniuLu/Python-100-Days / coroutine

Function coroutine

Day66-75/code/myutils.py:4–12  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

2
3
4def coroutine(fn):
5
6 @wraps(fn)
7 def wrapper(*args, **kwargs):
8 gen = fn(*args, **kwargs)
9 next(gen)
10 return gen
11
12 return wrapper

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected