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/2012-February/117027.html below:

[Python-Dev] PEP 414 - Unicode Literals for Python 3

[Python-Dev] PEP 414 - Unicode Literals for Python 3Armin Ronacher armin.ronacher at active-4.com
Tue Feb 28 09:09:20 CET 2012
Hi,

On 2/28/12 12:16 AM, martin at v.loewis.de wrote:
> Armin, I propose that you correct the *factual* deficits of the PEP
> (i.e. remove all claims that cannot be supported by facts, or are otherwise
> incorrect or misleading). Many readers here would be more open to accepting
> the PEP if it was factual rather than polemic.
Please don't call this PEP polemic.

> The PEP author is supposed to collect all arguments, even the ones he
> doesn't agree with, and refute them.
I brought up all the arguments that were I knew about before I submitted
this mailinglist thread and I had since not updated it.

> In this specific issue, the PEP states "the unicode_literals import the
> native string type is no longer available and has to be incorrectly
> labeled as bytestring"
> 
> This is incorrect: even though the native string type indeed is no longer
> available, it is *not* consequential that it has to be labeled as byte
> string. Instead, you can use the str() function.
Obviously it means not available by syntax.

> It may be that you don't like that solution for some reason. If so, please
> mention the approach in the PEP, along with your reason for not liking it.
If by str() you mean using "str('x')" as replacement for 'x' in both 2.x
and 3.x with __future__ imports as a replacement for native string
literals, please mention why this is better than u(), s(), n() etc.  It
would be equally slow than a custom wrapper function and it would not
support non-ascii characters.


Regards,
Armin
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