Fixed Python 3.2 syntax errors; refs #13724.