A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-February/061091.html below:

[Python-Dev] from __future__ import unicode_strings?

[Python-Dev] from __future__ import unicode_strings? [Python-Dev] from __future__ import unicode_strings?Jean-Paul Calderone exarkun at divmod.com
Thu Feb 16 01:56:17 CET 2006
On Thu, 16 Feb 2006 00:36:35 +0000 (UTC), Neil Schemenauer <nas at arctrix.com> wrote:
>I'm in the process of summarizing the dicussion on the bytes object
>and an idea just occured to me.  Imagine that I want to write code
>that deals with strings and I want to be maximally compatible with
>P3k.  It would be nice if I could add:
>
>    from __future__ import unicode_strings
>
>and have string literals without a 'u' prefix become unicode
>instances.  I'm not sure how tricky the implementation would be but
>it seems like a useful feature.

FWIW, I've considered this before, and superficially at least, it seems attractive.

>
>An even crazier idea is to have that import change 'str' to be
>an alias for 'unicode'.

That's further than I went, though :)  Until there's a replacement for str, this would make it impossible to do certain things with that __future__ import in effect.

Jean-Paul
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4