Skip to content

Commit 3686340

Browse files
authored
Merge pull request #562 from gorendes/patch-6
Create awaitme_niyazi_cetinkaya.py
2 parents 9bb2425 + d299052 commit 3686340

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Week05/awaitme_niyazi_cetinkaya.py

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

0 commit comments

Comments
 (0)