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

Yes it is really pulling a syntactic trick and not comparing against bools. From the docs:

Comparisons can be chained arbitrarily, e.g., x < y <= z is equivalent to x < y and y <= z, except that y is evaluated only once.

http://docs.python.org/reference/expressions.html#notin



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: