Xiang Zhang added the comment: I still hold my opinion that the current behaviour is correct. You are comparing two networks and you should count the mask in.
And notice that `neta == netb` is not totally equal to `neta.compare_networks(netb)`. The former can only results True or False but the later could result -1, 0 and 1. For example: >>> IPv4Network('192.0.2.0/25') == IPv4Network('192.0.2.0/25') True >>> IPv4Network('192.0.2.0/25').compare_networks(IPv4Network('192.0.2.0/25')) 0 >>> They can't be used exchangably. `compare_networks` actually does the work of all <, >, ==. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29913> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com