The plan is to kill __unicode__ and only use __str__. But we're not quite there yet.
On 8/8/07, Victor Stinner <[EMAIL PROTECTED]> wrote: > On Thursday 09 August 2007 00:22:51 Christian Heimes wrote: > > Hey Pythonistas! > > > > Victor Stinner just made a good point at #python. The py3k has no magic > > method and type slot for bytes. > > And another problem: mix of __str__ and __unicode__ methods. > > class A: > def __str__(self): return '__str__' > > class B: > def __str__(self): return '__str__' > def __unicode__(self): return '__unicode__' > > print (repr(str( A() ))) # display '__str__' > print (repr(str( B() ))) # display '__unicode__' > > > Proposition: > > __str__() -> str (2.x) becomes __bytes__() -> bytes (3000) > __unicode__() -> unicode (2.x) becomes __str__() -> str (3000) > > Victor Stinner aka haypo > _______________________________________________ > Python-3000 mailing list > [email protected] > http://mail.python.org/mailman/listinfo/python-3000 > Unsubscribe: > http://mail.python.org/mailman/options/python-3000/guido%40python.org > -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
