Daniel Diniz <aja...@gmail.com> added the comment: Not sure it's still important after 3.0 release. Confirmed in trunk:
import codecs class X: def __unicode__(self): print 'unicode' return u'unicode' def __str__(self): print 'str' return 'str' x=X() f = codecs.getwriter('utf8')(open("/tmp/out","w")) print >> f, x # 'str' ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue637094> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com