Michel Albert added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20825>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to