Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2013-01-12 Thread Dustin J. Mitchell
On Wed, Jan 9, 2013 at 12:14 AM, Guido van Rossum wrote: > But which half? A socket is two independent streams, one in each > direction. Twisted uses half_close() for this concept but unless you > already know what this is for you are left wondering which half. Which > is why I like using 'write'

Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2013-01-10 Thread Jasper St. Pierre
Well, if we're at the "bikeshedding about names" stage, that means that no serious issues with the proposal are left. So it's a sign of progress. On Wed, Jan 9, 2013 at 12:42 AM, Stephen J. Turnbull wrote: > Is this thread really ready to migrate to python-dev when we're still > bikeshedding met

Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2013-01-09 Thread Nick Coghlan
On Wed, Jan 9, 2013 at 8:55 PM, Yuriy Taraday wrote: > My interns told me that they remember EOF as special object only from high > school when they had to study Pascal. I guess, in 5 years students won't > understand how one can write an EOF. (and schools will finally replace > Pascal with Python

Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2013-01-08 Thread Stephen J. Turnbull
Is this thread really ready to migrate to python-dev when we're still bikeshedding method names? Yuriy Taraday writes: > > But which half? A socket is two independent streams, one in each > > direction. Twisted uses half_close() for this concept but unless you > > already know what this is for

Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2013-01-04 Thread Dustin Mitchell
As the maintainer of a pretty large, complex app written in Twisted, I think this is great. I look forward to a future of being able to select from a broad library of async tools, and being able to write tools that can be used outside of Twisted. Buildbot began, lo these many years ago, doing

Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2013-01-04 Thread Guido van Rossum
On Fri, Jan 4, 2013 at 2:38 PM, Dustin Mitchell wrote: > As the maintainer of a pretty large, complex app written in Twisted, I think > this is great. I look forward to a future of being able to select from a > broad library of async tools, and being able to write tools that can be used > outside

Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2012-12-21 Thread Jasper St. Pierre
On Fri, Dec 21, 2012 at 8:02 PM, Guido van Rossum wrote: ... snip ... In PEP 3156 conformant code you're supposed always to use 'yield > from'. The only time you see a bare yield is when it's part of the > implementation's internals. (However I think tulip actually will > handle a yield the same

Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2012-12-21 Thread Guido van Rossum
On Fri, Dec 21, 2012 at 5:17 PM, Jasper St. Pierre wrote: > On Fri, Dec 21, 2012 at 8:02 PM, Guido van Rossum wrote: > > ... snip ... > >> In PEP 3156 conformant code you're supposed always to use 'yield >> from'. The only time you see a bare yield is when it's part of the >> implementation's int

Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2012-12-21 Thread Guido van Rossum
On Fri, Dec 21, 2012 at 2:26 PM, Jonathan Slenders wrote: > As far as I understand, "yield from" will always work, because a Future > object can act like an iterator, and you can delegate your own generator to > this iterator at the place of "yield from". > "yield" only works if the parameter behi

Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2012-12-21 Thread Guido van Rossum
On Fri, Dec 21, 2012 at 1:04 PM, Laurens Van Houtven <_...@lvh.cc> wrote: > Looks reasonable to me :) Comments: > > create_transport "combines" a transport and a protocol. Is that process > reversible? that might seem like an exotic thing (and I guess it kind of > is), but I've wanted this e.g for

Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2012-12-21 Thread Jonathan Slenders
As far as I understand, "yield from" will always work, because a Future object can act like an iterator, and you can delegate your own generator to this iterator at the place of "yield from". "yield" only works if the parameter behind yield is already a Future object. Right Guido? In case of sleep

Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2012-12-21 Thread Laurens Van Houtven
Looks reasonable to me :) Comments: create_transport "combines" a transport and a protocol. Is that process reversible? that might seem like an exotic thing (and I guess it kind of is), but I've wanted this e.g for websockets, and I guess there's a few other cases where it could be useful :) eof_