Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Week05/awaitme_mert_colakoglu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def awaitme(func):
"""
A decorator that turns any function into a coroutine.

:param func: The function to be decorated.
:type func: callable
:return: An asynchronous wrapper of the function.
:rtype: callable
"""
async def _awaitme(*args, **kwargs):
return func(*args, **kwargs)

return _awaitme