[issue42620] documentation on `getsockname()` wrong for AF_INET6
Rick van Rein added the comment: Excellent, thanks. I personally would appreciate if a remark about IPv6 would also be made. -- ___ Python tracker <https://bugs.python.org/issue42620> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42620] documentation on `getsockname()` wrong for AF_INET6
New submission from Rick van Rein : Shown in the session below is unexpected output of a 4-tuple from an AF_INET6 socket along with documentation that *suggests* to expect a 2-tuple. The phrasing "IP" might have to be toned down to "IPv4" or "AF_INET" to be accurate enough to avoid confusion. Opinion: I think you should be explicit about the different behaviour for AF_INET6, so it is not reduced to a special/nut case for special interest groups. IPv6 has a hard enough time getting in; different formats for AF_INET and AF_INET6 should ideally be shown to all programmers, to at least avoid *uninformed* decisions to be incompatible with IPv6 while they develop on an IPv4 system (and the same in the opposite direction). Python 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> sox6 = socket.socket (socket.AF_INET6) >>> sox6.getsockname () ('::', 0, 0, 0) >>> sox6.getsockname.__doc__ 'getsockname() -> address info\n\nReturn the address of the local endpoint. For IP sockets, the address\ninfo is a pair (hostaddr, port).' -- components: Library (Lib) messages: 382863 nosy: vanrein priority: normal severity: normal status: open title: documentation on `getsockname()` wrong for AF_INET6 type: behavior versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue42620> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39637] Probably incorrect message after failed import
Change by Rick van Rein : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue39637> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39637] Probably incorrect message after failed import
Rick van Rein added the comment: Thanks for explaining. It is indeed confusing, even though I'm quite experienced with Python. -- ___ Python tracker <https://bugs.python.org/issue39637> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39637] Probably incorrect message after failed import
New submission from Rick van Rein : The following error message surprises me: >>> import os.environ Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'os.environ'; 'os' is not a package Shouldn't that say that "'environ' is not a package" instead? After all, 'os' will support >>> import os.path >>> This is confusing :) -- components: Interpreter Core messages: 362011 nosy: vanrein priority: normal severity: normal status: open title: Probably incorrect message after failed import versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue39637> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com