Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You'd name it MINIMUM_NUMBERS_FOR_1ST_PERCENTILE (your name was for the entire if).

To me "if len(numbers) < MINIMUM_NUMBERS_FOR_1ST_PERCENTILE" still reads better and requires me not to need to refer to comments, which I fall back on when I do not immediately get the code.

So maybe the risk is not lowered, but readability is still improved.

(Oh, and I wonder what do you return for a list of all equal numbers when there are more than a 100? If it's that number, why would suddenly going from 100 to 99 change that? ;)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: