fix formatter.py, backward compatibility with python 2.3.x