@@ -55,7 +55,7 @@ class newstr(unicode):
5555 """
5656 A backport of the Python 3 str object to Py2
5757 """
58- no_convert_msg = "Can't convert '{}' object to str implicitly"
58+ no_convert_msg = "Can't convert '{0 }' object to str implicitly"
5959
6060 def __new__ (cls , * args , ** kwargs ):
6161 """
@@ -101,7 +101,7 @@ def __getitem__(self, y):
101101 return newstr (super (newstr , self ).__getitem__ (y ))
102102
103103 def __contains__ (self , key ):
104- errmsg = "'in <string>' requires string as left operand, not {}"
104+ errmsg = "'in <string>' requires string as left operand, not {0 }"
105105 if isinstance (key , newstr ):
106106 newkey = key
107107 elif isinstance (key , unicode ):
@@ -130,7 +130,7 @@ def __rmul__(self, other):
130130 return newstr (super (newstr , self ).__rmul__ (other ))
131131
132132 def join (self , iterable ):
133- errmsg = 'sequence item {}: expected unicode string, found bytes'
133+ errmsg = 'sequence item {0 }: expected unicode string, found bytes'
134134 for i , item in enumerate (iterable ):
135135 if isinstance (item , bytes ):
136136 raise TypeError (errmsg .format (i ))
@@ -233,7 +233,7 @@ def __ne__(self, other):
233233 else :
234234 return True
235235
236- unorderable_err = 'unorderable types: str() and {}'
236+ unorderable_err = 'unorderable types: str() and {0 }'
237237
238238 def __lt__ (self , other ):
239239 if not istext (other ):
0 commit comments