3 ms·
Any time you have a scalar/measurement number, basically any value with physical units, counts, percentages, anything which could be in the denominator of a rat
by kortex 2y ago
Any time you have a scalar/measurement number, basically any value with physical units, counts, percentages, anything which could be in the denominator of a ratio, those are all strong indicators of a "semantic zero" and you really want to tell the difference between None and 0. They are usually floats, but could be ints (maybe you have number_of_widgets_online, 0 means 0 units, None means "idk".)
- hot_gril 2y agoWhat's the difference between none inches and 0 inches? Might need a concrete example. We deal with space a fair amount and haven't needed many optionals there.
- TwentyPosts 2y agoThey just gave a concrete example: The difference between "we don't know" and "we know that it's zero". Here's another fun one: I've seen APIs where "0.0" was treated as "no value, so take the default value". The default value happened to be 0.2.