nit: the first condition is an `and` of two elements not surrounded by parenthesis, but this one has outer (and, i think, redundant?) parenthesis: i guess it'd be better to be consistent (i prefer the former, but whatever pep8 says)