A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

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">&lt;<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>&gt;</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&#39;ve softened my position slightly from what I posted<br></div>
yesterday. I could live with the following compromise:<br>
<div class="im"><br>
 Â  Â &gt;&gt;&gt; x = IPv4Network(&#39;<a href="http://192.168.1.1/24" target="_blank">192.168.1.1/24</a>&#39;)<br>
 Â  Â &gt;&gt;&gt; y = IPv4Network(&#39;<a href="http://192.168.1.0/24" target="_blank">192.168.1.0/24</a>&#39;)<br>
</div> Â  Â &gt;&gt;&gt; x == y # Equality is the part I really want to see changed<br>
 Â  Â True<br>
<div class="im"> Â  Â &gt;&gt;&gt; x.ip<br>
 Â  Â IPv4Address(&#39;192.168.1.1&#39;)<br>
 Â  Â &gt;&gt;&gt; y.ip<br>
</div> Â  Â IPv4Address(&#39;192.168.1.0&#39;)<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&#39;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