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

Plenty of people would naturally expect `if x in range(big_number, other_big_number)` to work efficiently rather than having to write the comparison logic (and modulo check, if a step is involved) explicitly. If the code has `if x in y:` where y is a duck-typed input, it's awkward to special-case that.

Who is making membership checks against trivially-sized collections in a hot loop?

 help



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

Search: