A borrowed python 2 to 3 convertor