[Python-Dev] str bug? (original) (raw)
Mike Krell mbk.lists at gmail.com
Tue Oct 24 22:14:22 CEST 2006
- Previous message: [Python-Dev] __str__ bug?
- Next message: [Python-Dev] __str__ bug?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] __str__ bug?
- Next message: [Python-Dev] __str__ bug?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]