Python Forum
PEP 492 - Coroutines [async/await]
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PEP 492 - Coroutines [async/await]
#1
https://www.python.org/dev/peps/pep-0492/

Apparently this was added in time to be released in 3.5.  I'm running 3.5.2, and thought that this is one of the coolest things imaginable.  So, did you know about this?  Have you messed around with it yet?
Reply
#2
I'm similarly psyched but haven't used it yet. I read about it a while ago, but don't often have uses for stuff like this, especially for what I use Python for (I use non-Jython JVM stuff at work, not that Jython supports Python 3 anyway). If Python can really find its way to Android, stuff like this will be absolutely wonderful though.
Reply
#3
I immediately thought it'd be cool with urllib2/requests, so you could setup some handlers and work with the pages whenever they finished downloading. ...and then I immediately found out requests isn't awaitable, so the first step would have to be creating a threaded wrapper around it, which... isn't the quick sort of fun I was looking for, lol
Reply
#4
Yeah, I think the standard libs aren't really incorporating it yet. They rushed to get it in at all. You can often copy-paste the standard libs and modify them yourself though.
Reply
#5
(Oct-05-2016, 04:06 PM)nilamo Wrote: Apparently this was added in time to be released in 3.5.  I'm running 3.5.2, and thought that this is one of the coolest things imaginable.  So, did you know about this?
Yes have know this for some time,not tested it yet.
David Beazley has a least 2-3 videos about this topic,here is one.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Async API request and NTLM authentication himanshuj89 0 1,335 Nov-05-2022, 02:06 PM
Last Post: himanshuj89
  Why does await only work in async? n4te99 0 1,609 Jan-19-2021, 09:46 AM
Last Post: n4te99
  Transcrypt Python to JavaScript compiler now supports async/await jacques_de_hooge 4 4,634 Aug-24-2017, 04:21 PM
Last Post: snippsat
  Exploring async/await, without knowing how they work ahead of time nilamo 3 11,358 May-07-2017, 03:18 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020