tostring has no method kwarg in python 2.6