force unicode strings

Stefan Behnel stefan.behnel-n05pAM at web.de
Wed Aug 1 16:37:17 EDT 2007


Thomas Guettler wrote:
> is it possible to force all non ascii strings to be unicode strings
> somehow?
> 
> Sometimes I forget that I need to write u'...' if the string contains
> an umlaut. I get an exception in django later. But since the
> exception does not show the string it is hard to find it.

I guess you can't afford to wait for Python 3, can you?

http://www.python.org/dev/peps/pep-3100/#atomic-types

Stefan



More information about the Python-list mailing list