Barry A. Warsaw added the comment: Hi Antoine,
On May 28, 2017, at 11:07 AM, Antoine Pitrou wrote: >I think the API is too specific. Can you elaborate? What's too specific about it? Do you have in mind a use case where you wouldn't need to provide hostname and port? >Instead of requiring hostname and port, why not let the user override setup >and teardown coroutines? > >In your case, this could be: > >async def setup(self): > self.server = await self.loop.create_server(...) > >async def teardown(self): > await self.server.wait_closed() It's certainly possible to factor those out so they could be overridden, I'm just not sure why that's needed. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30300> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com