##// END OF EJS Templates
context: implement both __bytes__ and __str__ for Python 3...
Augie Fackler -
r31344:c99371e3 default
parent child Browse files
Show More
@@ -65,6 +65,12 class basectx(object):
65 return o
65 return o
66
66
67 def __str__(self):
67 def __str__(self):
68 r = short(self.node())
69 if pycompat.ispy3:
70 return r.decode('ascii')
71 return r
72
73 def __bytes__(self):
68 return short(self.node())
74 return short(self.node())
69
75
70 def __int__(self):
76 def __int__(self):
General Comments 0
You need to be logged in to leave comments. Login now