str vs unicode

John Arbash Meinel john at arbash-meinel.com
Fri May 27 07:57:43 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/27/2011 05:19 AM, Robert Collins wrote:
> On Fri, May 27, 2011 at 2:35 PM, Martin Pool <mbp at canonical.com> wrote:
>> So then the question is, should we perhaps instead move to using
>> __unicode__ on objects for the latter, for the sake of being a bit
>> safer with unicode values, and perhaps also for an easier transition
>> to python3?
> 
> Doesn't python3 delete __unicode__ ? In the spirit of having no
> compatiblity concerns, after all :)
> 
> -Rob
> 

It deleted __unicode__ because __str__ *is* __unicode__.

So I'm in favor of using __unicode__ in python2 for anything that is
user-facing.

Just like 'paths' are Unicode inside bzrlib, 'messages' should be
Unicode as well.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3fWXcACgkQJdeBCYSNAANmLQCfRF75CKeFiVOO7qxWoobd8eK6
Uo4AnRNHwGLaH80+pC6RsWLVmh2Cxux+
=sW9W
-----END PGP SIGNATURE-----



More information about the bazaar mailing list