Message290573
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 <, >, ==. |
|
Date |
User |
Action |
Args |
2017-03-27 10:10:16 | xiang.zhang | set | recipients:
+ xiang.zhang, ncoghlan, pmoody, Sanjay |
2017-03-27 10:10:16 | xiang.zhang | set | messageid: <1490609416.23.0.757711339103.issue29913@psf.upfronthosting.co.za> |
2017-03-27 10:10:16 | xiang.zhang | link | issue29913 messages |
2017-03-27 10:10:16 | xiang.zhang | create | |
|