update tableformat.py for 3.5