##// END OF EJS Templates
py3: change encoding.localstr to a subclass of bytes, not str
Yuya Nishihara -
r33810:dabe1f11 default
parent child Browse files
Show More
@@ -78,11 +78,11 b' except locale.Error:'
78 78 encodingmode = environ.get("HGENCODINGMODE", "strict")
79 79 fallbackencoding = 'ISO-8859-1'
80 80
81 class localstr(str):
81 class localstr(bytes):
82 82 '''This class allows strings that are unmodified to be
83 83 round-tripped to the local encoding and back'''
84 84 def __new__(cls, u, l):
85 s = str.__new__(cls, l)
85 s = bytes.__new__(cls, l)
86 86 s._utf8 = u
87 87 return s
88 88 def __hash__(self):
General Comments 0
You need to be logged in to leave comments. Login now