On Sat, 2011-12-10 at 15:55 +1000, Nick Coghlan wrote: > So I'm back to being -1 on the idea of adding back u'' literals for > 3.3. Instead, people should explicitly call str() on any literals that > they want to be actual str instances both in 3.x and in 2.x when the > unicode literals future import is in effect.
After thinking on it a while, I can't see anything wrong with this strategy except for the 10X performance hit for defining native literals. Truth be told, in the vast majority of WSGI apps only high-level WSGI libraries (like WebOb and Werkzeug) and standalone middleware really needs to work with native strings. And the middleware really should be using the high-level libraries to parse WSGI anyway. So there are a finite number of places where it's actually a real issue. As someone who ported WebOb and other stuff built on top of it to Python 3 without using "from __future__ import unicode_literals", I'm kinda sad that to be using best practice I'll have to go back and flip the polarity on everything. It's my cross to bear, though. If I have any issue with it in the future I'll bring u'' back up. - C _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com