Skip to content

Commit 6f7facc

Browse files
authored
Merge pull request #622 from beyzasaridas/patch-7
Create awaitme_beyza_saridas.py
2 parents 651898a + ea6bf15 commit 6f7facc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Week05/awaitme_beyza_saridas.py

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

0 commit comments

Comments
 (0)