[docs] [issue27269] ipaddress: Wrong behavior with ::ffff: style IPs

Марк Коренберг report at bugs.python.org
Fri Jul 8 07:09:38 EDT 2016

Марк Коренберг 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: 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 at python
components: +Documentation
nosy: +docs at python

Python tracker <report at bugs.python.org>

More information about the docs mailing list