fixed use of python 2.5+ feature