The comment included a typo and, using 'max' as variable name, I was accidentally shadowing Python's builtin 'max' function