Difference between revisions of "Await"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
  
 
== In Python ==
 
== In Python ==
[[Python 3.5]] (2015)<ref>https://www.python.org/downloads/release/python-350/#:~:text=is%20available%20here.-,Python%203.5.,released%20on%20September%2013th%2C%202015.</ref> has added support for <code>[[async]]/await</code> as described in [[PEP]] 492 (https://www.python.org/dev/peps/pep-0492/).
+
[[Python 3.5]] (2015)<ref>https://www.python.org/downloads/release/python-350/#:~:text=is%20available%20here.-,Python%203.5.,released%20on%20September%2013th%2C%202015.</ref> has added support for <code>[[async]]/[[await]]</code> as described in [[PEP]] 492 (https://www.python.org/dev/peps/pep-0492/).
  
  
Line 13: Line 13:
 
  [[async]] [[def]] main():
 
  [[async]] [[def]] main():
 
     [[print]]("hello")
 
     [[print]]("hello")
     await asyncio.sleep(1)
+
     await asyncio.[[sleep]](1)
 
     print("world")
 
     print("world")
 
   
 
   
Line 22: Line 22:
  
 
== See also ==
 
== See also ==
 +
* {{import}}
 
* {{programming}}
 
* {{programming}}
  
  
 
[[Category:Programming]]
 
[[Category:Programming]]

Latest revision as of 07:52, 7 June 2024

Advertising: