Author exhuma
Recipients exhuma, ncoghlan, pitrou, pmoody
Date 2014-03-02.14:07:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1393769232.45.0.718300020891.issue20825@psf.upfronthosting.co.za>
In-reply-to
Content
Hmm... after thinking about this, I kind of agree. I was about to state something about the fact that you could consider networks like an "ordered set". And use that to justify my addition :) But the more I think about it, the more I am okay with your point.

I quickly tested the following:

    >>> a = ip_network('10.0.0.0/24')
    >>> b = ip_network('10.0.0.0/30')
    >>> a <= b
    True
    >>> b <= a
    False

Which is wrong when considering "containement".

What about an instance-method? Something like ``b.contained_in(a)``?

At least that would be explicit and avoids confusion. Because the existing ``__lt__`` implementation makes sense in the way it's already used.
History
Date User Action Args
2014-03-02 14:07:12exhumasetrecipients: + exhuma, ncoghlan, pitrou, pmoody
2014-03-02 14:07:12exhumasetmessageid: <1393769232.45.0.718300020891.issue20825@psf.upfronthosting.co.za>
2014-03-02 14:07:12exhumalinkissue20825 messages
2014-03-02 14:07:11exhumacreate