[issue39483] Proposial add loop parametr to run in asyncio

Andrew Svetlov report at bugs.python.org
Wed Jan 29 08:13:46 EST 2020


Andrew Svetlov <andrew.svetlov at gmail.com> added the comment:

-1.
I rather suggest updating telethon example in the following matter:

async with main():
    with TelegramClient('anon', api_id, api_hash) as client:
        await client.send_message('me', 'Hello, myself!')

You PR brings more problems than fixes: the loop is closed after the first usage, the next call with the same loop fails.
I don't think that we should support such tricky mode.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39483>
_______________________________________


More information about the Python-bugs-list mailing list