[issue41820] ipaddress Library gives me incorrect results

2020-09-20 Thread Anudeep Balla
Anudeep Balla 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

[issue41820] ipaddress Library gives me incorrect results

2020-09-20 Thread Anudeep Balla
Anudeep Balla added the comment: That was the whole point I was trying to make that there were no references that state .00 is equivalent to .0 and if you would try any IP validator or would check by any means you would find that the IP address is invalid. I truly understand the point

[issue41820] ipaddress Library gives me incorrect results

2020-09-20 Thread Anudeep Balla
New submission from Anudeep Balla : https://docs.python.org/3.8/library/ipaddress.html import ipaddress ADDRESSES = [ '172.16.254.00' ] for ip in ADDRESSES: addr = ipaddress.ip_address(ip) if addr.version==4: { print("true")