Showing content from http://mail.python.org/pipermail/python-dev/attachments/20090928/a40aec1b/attachment.htm below:
<div class="gmail_quote">On Mon, Sep 28, 2009 at 7:24 AM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div>I should note that I've softened my position slightly from what I posted<br></div>
yesterday. I could live with the following compromise:<br>
<div class="im"><br>
  >>> x = IPv4Network('<a href="http://192.168.1.1/24" target="_blank">192.168.1.1/24</a>')<br>
  >>> y = IPv4Network('<a href="http://192.168.1.0/24" target="_blank">192.168.1.0/24</a>')<br>
</div> Â Â >>> x == y # Equality is the part I really want to see changed<br>
  True<br>
<div class="im"> Â Â >>> x.ip<br>
  IPv4Address('192.168.1.1')<br>
  >>> y.ip<br>
</div>   IPv4Address('192.168.1.0')<br></blockquote></div><br>With those semantics, IPv4Network objects with distinct IP addresses (but the same network) could no longer be stored in a dictionary or set. IMO, it is a little counter-intuitive for objects to compare equal yet have different properties. I don't think this is a good compromise.<br>
<blockquote style="margin: 1.5em 0pt;">--<br>
Daniel Stutzbach, Ph.D.<br>
President, <a href="http://stutzbachenterprises.com">Stutzbach Enterprises, LLC</a>
</blockquote>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4