Make localhost an acceptable parameter to ipaddress.IPv4Address address parameter

Title is pretty self explanatory. Right the following causes an error: ```py
But it should just either convert `localhost` to `127.0.0.1` or maybe store `localhost` internally somehow.

On Wed, Sep 22, 2021 at 9:57 AM Andres Torres <andres.torreshalo@gmail.com> wrote:
"localhost" is a name that can be resolved, and by default, it resolves to 127.0.0.1. But it's not itself an IP address. If you want to be able to look up names, try socket.gethostbyname(), which is quite happy to accept IP addresses (and will return them unchanged). Be aware that it may take time to get a result back. ChrisA

On Wed, Sep 22, 2021 at 9:57 AM Andres Torres <andres.torreshalo@gmail.com> wrote:
"localhost" is a name that can be resolved, and by default, it resolves to 127.0.0.1. But it's not itself an IP address. If you want to be able to look up names, try socket.gethostbyname(), which is quite happy to accept IP addresses (and will return them unchanged). Be aware that it may take time to get a result back. ChrisA
participants (2)
-
Andres Torres
-
Chris Angelico