memesearch
Overcomplicated NaN Check

Overcomplicated NaN Check

Download Find similar pictures
Text on the meme
# function to check if a string is NaN def isnan(self,value): try: import math return math.isnan(float(value)) except: return False
What it means

A Python code snippet checks whether a string is NaN by converting it to a float and calling math.isnan, while catching every exception and returning False. The joke is that the simple check is wrapped in unnecessary complexity and broad error handling, a relatable reaction to overengineered code. EN: A Python code snippet checks whether a string is NaN by converting it to a float and calling math.isnan, while catching every exception and returning False. The joke is that the simple check is wrapped in unnecessary complexity and broad error handling, a relatable reaction to overengineered code.

Objects
Tags
Source
Type
image
Size
640×237 · 26.4 KiB
Mood
sarcastic
Language
en
Added