Re: [Python-Dev] ABCs - Re: PEP 492: async/await in Python; version 4

2015-05-05 Thread Guido van Rossum
On Mon, May 4, 2015 at 10:35 AM, Jim J. Jewett wrote: > Which reminds me ... *should* the "await" keyword work with any future, > or is it really intentionally restricted to use with a single library > module and 3rd party replacements? > You can make any Future type work with await by adding an

Re: [Python-Dev] ABCs - Re: PEP 492: async/await in Python; version 4

2015-05-04 Thread Jim J. Jewett
On Sun May 3 08:32:02 CEST 2015, Stefan Behnel wrote: > Ok, fair enough. So, how would you use this new protocol manually then? > Say, I already know that I won't need to await the next item that the > iterator will return. For normal iterators, I could just call next() on it > and continue the f