This seems like a reasonable way to handle it.  Note that `max` on its own is kind of a bad name since it overrides the built-in [max() function](http://docs.python.org/2/library/functions.html#max).