Skip to content

Commit 2115a97

Browse files
authored
Merge pull request #783 from eceakinci56/patch-10
Create awaitme_ece_akinci.py
2 parents 7423af7 + 3bf5451 commit 2115a97

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Week05/awaitme_ece_akinci.py

Lines changed: 9 additions & 0 deletions
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)