Updated str methods to support python 27 as well as 34