Re: [Python-Dev] Asynchronous context manager in a typical network server

2015-12-18 Thread Szieberth Ádám
> I guess we could make the default arg to sleep() 1e9. Or make it None and > special-case it. By writing the OP, I considered suggesting this approach and rejected. I would have suggest the using Ellipsis (`...`) for the special case which seemed to explain more what is done plus it can hardly

Re: [Python-Dev] Asynchronous context manager in a typical network server

2015-12-18 Thread Szieberth Ádám
> Maybe you can help by submitting a patch that prevents this error! Are you > interested? I'd be honored. Ádám (http://szieberthadam.github.io/) P.S.: Was thinking about a longer answer but finally I ended up with this one :) ___ Python-Dev mailing li

Re: [Python-Dev] Asynchronous context manager in a typical network server

2015-12-18 Thread Szieberth Ádám
Thanks for your reply Andrew! > Personally I don't feel the need for `wait_forever()` or > `loop.creae_context_task()`. > > But even if you need it you may create it from scratch easy, isn't it? Indeed. I was prepared for such opinions which is OK. It is better to think it through several times

Re: [Python-Dev] Asynchronous context manager in a typical network server

2015-12-18 Thread Szieberth Ádám
Thanks for your reply Guido! > - Instead of calling signal.signal() yourself, you should use > loop.add_signal_handler(). It makes sure your signal handler doesn't run > while another handler is already running. I was opted to the signal module because `signal` documentation suggest that it alos

[Python-Dev] Asynchronous context manager in a typical network server

2015-12-18 Thread Szieberth Ádám
Hi Developers! This is my first post. Please excuse me my poor English. If anyone is interested, I wrote a small introduction on my homepage. Link is at the bottom. This post is about how to effectively implement the new asynchronous context manager in a typical network server. I would appreciat