Skip to content

Commit 9a9a2dc

Browse files
Create awaitme_hamza_kiziltoprak.py
1 parent 3686340 commit 9a9a2dc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Week05/awaitme_hamza_kiziltoprak.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import asyncio
2+
3+
def awaitme(func):
4+
async def _wrapper(*args,**kwargs):
5+
result = func(*args,**kwargs)
6+
if asyncio.iscoroutine(result):
7+
return await result
8+
return result
9+
return _wrapper

0 commit comments

Comments
 (0)