Skip to content

Commit 0a226af

Browse files
authored
Merge pull request #672 from Extocraftor/patch-9
Create awaitme_mert_durgun.py
2 parents 6f7facc + a70238c commit 0a226af

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Week05/awaitme_mert_durgun.py

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

0 commit comments

Comments
 (0)