[Python-Dev] doctest, unicode repr, and 2to3

Antoine Pitrou solipsis at pitrou.net
Fri Mar 5 16:56:09 CET 2010


Le Thu, 4 Mar 2010 23:30:12 -0500,
Barry Warsaw <barry at python.org> a écrit :
> 
> If you really want to test that it's a unicode, shouldn't you
> actually test its type?  (I'm not sure what would happen with that
> under 2to3.)  Besides, the type of the string is very rarely
> important, so I think the u-prefix and quotes is mostly just noise.

String type is actually very important, if you don't want your
application/library to fail in the face of non-ASCII data.

That's why we did all this thing in py3k, after all :)

Regards

Antoine.




More information about the Python-Dev mailing list