[Python-Dev] PEP-498: Literal String Formatting

Alexander Walters tritium-list at sdamon.com
Sat Aug 8 17:23:25 CEST 2015


As written in the pep, where i'' means 'I have the __interpolate__' 
method, and iu'' means 'i have the __interpolateu__' method (or that 
translators should call these methods), is fine, as the meaning of u ('I 
am unicode, yeah you already knew that') isn't changed.

On 8/8/2015 11:07, Nick Coghlan wrote:
> On 9 August 2015 at 00:05, Alexander Walters <tritium-list at sdamon.com> wrote:
>> Please do not change the meaning of the vestigial U''.  It was re-added to
>> the language to fix a problem, rebinding it to another meaning introduces
>> new problems.  We have plenty of other letters in the alphabet to use.
> It's actually being used in the same sense we already use it - I'm
> just adding a new compile time use case where the distinction matters
> again, which we haven't previously had in Python 3. (The usage in this
> PEP is fairly closely analogous to WSGI's distinction between native
> strings, text strings and binary strings, which matters for hybrid
> Python 2/3 code, but not for pure Python 3 code)
>
> It would certainly be *possible* to use a different character for that
> aspect of the PEP, but it would be additional work without any obvious
> gain.
>
> Cheers,
> Nick.
>
> P.S. I hop on the plane for the US in a few hours, so I'll be aiming
> to be bad at responding to emails until the 17th or so. We'll see how
> well I stick to that plan :)
>



More information about the Python-Dev mailing list