[Python-Dev] str bug? (original) (raw)

Mike Krell mbk.lists at gmail.com
Tue Oct 24 22:14:22 CEST 2006


class S(str): def str(self): return "S.str"

class U(unicode): def str(self): return "U.str" print str(S()) print str(U()) This script prints: S.str U.str

Yes, but "print U()" prints nothing, and the explicit str() should not be necessary.

Mike



More information about the Python-Dev mailing list