[Python-3000] u'text' as an alias for 'text'?
Lennart Regebro
regebro at gmail.com
Thu Mar 20 17:28:28 CET 2008
On Thu, Mar 20, 2008 at 4:40 PM, Charles Merriam
<charles.merriam at gmail.com> wrote:
> The problem is not the gratuitous removal of the leading 'u', but the
> subtle problems when
> the code looks nearly identical. The most likely one to cause
> problems is the new semantics
> of the keys operations. While I haven't read the 3.0 code, this is
> what was stated at Guido's
> last talk.
No, the problem is the lack of u'' support. I've tried. :)
The new semantics of the keys operation means that keys() will work
like iterkeys() works now. This is not a problem unless you try to use
the result of keys() as a list, which isn't commonly done. Those types
of problems is however completely unavoidable in any case, 2to3 won't
solve them either, as I understand it.
I like your t"Hello" literal, it's prettier than the standard
_("Hello") binding, and this is a parallell case to the u("Hello")
binding I mentioned before as a partial workaround for the unicode
problem. Perhaps something to think about for 3.1?
--
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64
More information about the Python-3000
mailing list