Mark T. Tomczak on Nostr: #python , why are you trying to kill my soul?<code>>>> from math import ...
#python , why are you trying to kill my soul?<code>>>> from math import nan<br>>>> min(nan, 1)<br>nan<br>>>> min(1, nan)<br>1<br>>>><br></code>
... stuff like this is why people just memorize the rule "Avoid the magic floating-point values like the plague."
Published at
2024-06-27 21:39:39Event JSON
{
"id": "2315dd6cfeec7f6c0faf9efb20bbcfbd7e92c8244e8e71461304dd492affd517",
"pubkey": "7898a773eabb308d08b5ad0526ee84fb764c6a0020dfca9a732110b4e49bf575",
"created_at": 1719524379,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.fixermark.com/@mark/112690749726037123",
"web"
],
[
"t",
"python"
],
[
"proxy",
"https://mastodon.fixermark.com/users/mark/statuses/112690749726037123",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.fixermark.com/users/mark/statuses/112690749726037123",
"pink.momostr"
],
[
"expiration",
"1722117314"
]
],
"content": "#python , why are you trying to kill my soul?\u003ccode\u003e\u0026gt;\u0026gt;\u0026gt; from math import nan\u003cbr\u003e\u0026gt;\u0026gt;\u0026gt; min(nan, 1)\u003cbr\u003enan\u003cbr\u003e\u0026gt;\u0026gt;\u0026gt; min(1, nan)\u003cbr\u003e1\u003cbr\u003e\u0026gt;\u0026gt;\u0026gt;\u003cbr\u003e\u003c/code\u003e\n\n... stuff like this is why people just memorize the rule \"Avoid the magic floating-point values like the plague.\"",
"sig": "c9c0253f15c3497ee5e9812e52050547c70cabd7f9ec97c81c9764018e4b3a16898612935b09c2d9500991648e2d48b08ef944c25ab900e40c891bddcf2aa38a"
}