We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a587f7c commit a92f346Copy full SHA for a92f346
1 file changed
Level_09/async.py
@@ -3,12 +3,10 @@
3
import string
4
from sys import argv
5
6
-# alternativ (ab Python 3.5): async def
7
-@asyncio.coroutine
8
-def print_string(mystring, wait=0.1):
+async def print_string(mystring, wait=0.1):
9
while True:
10
print(mystring, end="", flush=True)
11
- yield from asyncio.sleep(wait) # alternativ (ab Python 3.5): await
+ await asyncio.sleep(wait)
12
13
"""
14
Die Event-Loop ist bei asyncio sehr wichtig.
0 commit comments