I really don't want to break all the uses of this idiom on a point
release, but I agree it's hard to understand. Maybe we can compromise
and add a warning when _stopping is True upon entering run_forever()?

On Thu, Nov 19, 2015 at 10:07 AM, Yury Selivanov <yseliva...@gmail.com> wrote:
>
>> On Nov 19, 2015, at 1:01 PM, Aymeric Augustin 
>> <aymeric.augus...@polytechnique.org> wrote:
>>
>> Hello,
>>
>> I understand the backwards-compatibility concerns. However I have to say that
>> the pattern:
>>
>>     loop.call_soon(loop.stop)
>>     loop.run_forever()
>>
>> seems much easier to understand and more logical than:
>>
>>     loop.stop()
>>     loop.run_forever()
>
>
> I agree.
>
> I think we’re trying too hard to save a broken behaviour.  "loop.stop(); 
> loop.run_forever()” is completely non-obvious, it’s a bad practice to use 
> stop/run_forever like this.
>
> Yury



-- 
--Guido van Rossum (python.org/~guido)

Reply via email to