New submission from Kevin Mai-Hsuan Chia <ke...@mhchia.com>:
It seems the result of `asyncio.Server.sockets` after `asyncio.Server.close()` is performed becomes `[]` instead of `None` since python 3.7. However, in the [document 3.7 and 3.8](https://docs.python.org/3.8/library/asyncio-eventloop.html#asyncio.Server.sockets), it states ``` List of socket.socket objects the server is listening on, or None if the server is closed. Changed in version 3.7: Prior to Python 3.7 Server.sockets used to return an internal list of server sockets directly. In 3.7 a copy of that list is returned. ``` For me, I think the comment `Changed in version 3.7: ...` only emphasizes the "copied list" is returned. IMO it will be more clear if the change from `None` to `[]` is mentioned in the comment as well. Sorry if this issue is not appropriate. Thanks! ---------- assignee: docs@python components: Documentation messages: 336287 nosy: docs@python, mhchia priority: normal severity: normal status: open title: Result of `asyncio.Server.sockets` after `Server.close()` is not clear type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36074> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com