<p><span class="h-card" translate="no"><a href="https://mastodon.social/@dabeaz" class="u-url mention">@<span>dabeaz</span></a></span> <span class="h-card" translate="no"><a href="https://ciberlandia.pt/@villares" class="u-url mention">@<span>villares</span></a></span> </p><p>&gt;&gt;&gt; set([float(&#39;nan&#39;)] * 3)<br />{nan}<br />&gt;&gt;&gt; set(float(&#39;nan&#39;) for _ in range(3))<br />{nan, nan, nan}</p><p>In terms of identity and equality, nan seems on the opposite end of the spectrum of None.</p><p>Every None is identical, while every nan is unique.</p><p>Maybe instead of using object() as a unique sentinel value, we could use float(&#39;nan&#39;) 🤔🙊</p>
Reply