Anudeep Balla <anudeepball...@gmail.com> added the comment:
Greetings,
Any Ip address containing 2 zeros or more are considered to be an invalid
IP address.
'172.16.254.00' *is not* equivalent to '172.16.254.0'
I guess this small logic is causing the error
I hope it makes it clear from the below images.
Regards,
Raj.
[image: Screen Shot 2020-09-20 at 11.42.39 AM.png]
[image: Screen Shot 2020-09-20 at 11.42.31 AM.png]
[image: Screen Shot 2020-09-20 at 11.42.18 AM.png]
[image: Screen Shot 2020-09-20 at 11.42.09 AM.png]
On Sun, 20 Sep 2020 at 08:00, Eric V. Smith <rep...@bugs.python.org> wrote:
>
> Eric V. Smith <e...@trueblade.com> added the comment:
>
> Simplified:
> >>> import ipaddress
> >>> print(ipaddress.ip_address('172.16.254.00').version)
> 4
>
> So your concern is that you think '172.16.254.00' (or equivalently,
> '172.16.254.0') shouldn't be treated as a valid IPv4 address. Is that
> correct?
>
> Can you tell us why you think it's not a valid IPv4 address? I think
> everything is working correctly here.
>
> ----------
> nosy: +eric.smith
>
> _______________________________________
> Python tracker <rep...@bugs.python.org>
> <https://bugs.python.org/issue41820>
> _______________________________________
>
----------
Added file: https://bugs.python.org/file49465/Screen Shot 2020-09-20 at
11.42.31 AM.png
Added file: https://bugs.python.org/file49466/Screen Shot 2020-09-20 at
11.42.39 AM.png
Added file: https://bugs.python.org/file49467/Screen Shot 2020-09-20 at
11.42.18 AM.png
Added file: https://bugs.python.org/file49468/Screen Shot 2020-09-20 at
11.42.09 AM.png
_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41820>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com