Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
kstrauser
2y ago
0 comments
Share
You're right about the unexpected results in that case, but I'd bet good money that accidentally dividing by zero in code like `avg=sum(lst)/len(lst)` is far more common in standard Python code than dividing very small numbers.
0 comments
default
newest
oldest
netcraft
2y ago
totally agreed, and its so common that some places like snowflake give you div0 and div0null to opt into just returning 0 or null in those cases
j
/
k
navigate · click thread line to collapse