Skip to content

Commit cd26d46

Browse files
authored
Merge pull request #846 from keremkurtuldu/patch-7
Create awaitme_kerem_kurtuldu.py
2 parents 7e6f963 + 7da307b commit cd26d46

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Week05/awaitme_kerem_kurtuldu.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(function):
4+
async def wrapper(*args, **kwargs):
5+
result = function(*args, **kwargs)
6+
if asyncio.iscoroutine(result):
7+
return await result
8+
return result
9+
return wrapper

0 commit comments

Comments
 (0)