fix syntax of #670 for python 2.6