add index to format to support python2.6 (#5104)