This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author exhuma
Recipients James Schneider, JamesGuthrie, SilentGhost, berker.peksag, eric.smith, exhuma, ncoghlan, pitrou, pmoody, r.david.murray
Date 2016-06-25.13:46:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1466862409.3.0.967007895594.issue20825@psf.upfronthosting.co.za>
In-reply-to
Content
I don't quite see how the operator module could help. I don't have much experience with it though, so I might be missing something...

I don't see how I can relate one check to the other. The example I gave in the patch review was the following:

With the existing implementation:

'192.168.1.0/25' subnet of '192.168.1.128/25' -> False
'192.168.1.0/25' supernet of '192.168.1.128/25' -> False

With the proposal to simply return "not subnet_of(...)" it would become:

'192.168.1.0/25' subnet of '192.168.1.128/25' -> False
'192.168.1.0/25' supernet of '192.168.1.128/25' -> True

which would be wrong.


I have now added the new test-cases for the TypeError and removed the code-duplication by introducing a new "private" function. Let me know what you think.


I am running all test cases again and I'll uploaded it once they finished.
History
Date User Action Args
2016-06-25 13:46:49exhumasetrecipients: + exhuma, ncoghlan, pitrou, eric.smith, pmoody, r.david.murray, SilentGhost, berker.peksag, JamesGuthrie, James Schneider
2016-06-25 13:46:49exhumasetmessageid: <1466862409.3.0.967007895594.issue20825@psf.upfronthosting.co.za>
2016-06-25 13:46:49exhumalinkissue20825 messages
2016-06-25 13:46:49exhumacreate