Mark T. Tomczak on Nostr: #python , why are you trying to kill my soul? >>> from math import nan >>> min(nan, ...
#python , why are you trying to kill my soul?
>>> from math import nan
>>> min(nan, 1)
nan
>>> min(1, nan)
1
>>>
... 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": "9d2052a10b0c5e9d735840c3557ac243d5953c53fc6d438c69e10351d1b811fb",
"pubkey": "7221088fd13582e0c5028fc00a25730381d6578a0d7e20ab5e7e38bf23a14e88",
"created_at": 1719524379,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"proxy",
"https://mastodon.fixermark.com/users/mark/statuses/112690749726037123",
"activitypub"
]
],
"content": "#python , why are you trying to kill my soul?\n\n\u003e\u003e\u003e from math import nan\n\u003e\u003e\u003e min(nan, 1)\nnan\n\u003e\u003e\u003e min(1, nan)\n1\n\u003e\u003e\u003e\n\n\n... stuff like this is why people just memorize the rule \"Avoid the magic floating-point values like the plague.\"",
"sig": "eb3740b040fbf308fdb125636f8cf23a64d5421e13468dc02c2d6ec7e9573e8a4dddc9c93a7ea4d14056db265c60eb869811b83e4c9d5760288a2a0cbefbb042"
}