[issue27269] ipaddress: Wrong behavior with ::ffff:1.2.3.4 style IPs
Марк Коренберг added the comment:
Also, it should be marked explicitly, if cross-type lookup is safe. I mean code like that:
some_net = ipaddress.ip_network(some_input1)
some_addr = ipaddress.ip_address(some_input2)
return some_addr in some_net
Is it safe to write such code? Docs say:
21.28.2.3. Operators
Address objects support some operators. Unless stated otherwise,
operators can only be applied between compatible objects
(i.e. IPv4 with IPv4, IPv6 with IPv6).
1. It is not said if exception will be raised if incompatible objects are used, and not said if result is defined.
2. "Unless stated otherwise" - Seem it is stated nowhere.
----------
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
_______________________________________
Python tracker
participants (1)
-
Марк Коренберг