Eric V. Smith <e...@trueblade.com> added the comment:

Please do not include screen shots in bug reports. They've unfriendly to people 
who use screen readers or other accessibility software. Instead, please copy 
and paste (or retype, if needed) the text into the comment section.

> '172.16.254.00' *is not* equivalent to '172.16.254.0'

Do you have an RFC or other document that makes that clear? I've never seen an 
IP address library that makes a distinction between '00' and '0'. But I'm happy 
to learn something new, if you can point to a standard.

If this were going to be an error, it would be in the call to 
ipaddress.ip_address() or its equivalent. It would raise ValueError, like it 
does for other strings that don't represent valid addresses. But for backward 
compatibility reasons, unless there's a standard that explicitly disallows .00, 
I doubt we'd change the code to raise an exception. And even if there were a 
standard that says .00 is not a valid address, I'd be reluctant to make a 
change here. We could potentially break people's code, and we'd need a very 
good reason to do that.

Also, is this causing you a practical problem? Is there somewhere you're 
getting a .00 address and you'd like to treat it as being invalid?

----------

_______________________________________
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

Reply via email to