STINNER Victor <vstin...@redhat.com> added the comment:

Attached inet_aton_pton.py is a proof-of-concept which reimplements inet_aton() 
using inet_pton(). It supports a.b.c.d, a.b.c, a.b and a formats. I'm not sure 
which exception should be raised in case of parsing error.

socket.inet_aton() raises OSError"illegal IP address string passed to 
inet_aton") using C code:

    PyErr_SetString(PyExc_OSError,
                    "illegal IP address string passed to inet_aton");

----------
Added file: https://bugs.python.org/file48457/inet_aton_pton.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37495>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to