class a(str):
def b(self,*x,**y):
print str.decode(self,*x,**y)
b=a()
b.b('utf-8','aaa') # This prints nothing, why?
class a(str): def b(self,*x,**y): print str.decode(self,*x,**y) b=a() b.b(‘utf-8′,’aaa’) # This prints nothing, why?
Share
Try initialize your string first, with some value: