[Python-ideas] Draft2 PEP on string interpolation

Cody Piersall cody.piersall at gmail.com
Thu Aug 27 15:36:04 CEST 2015


On Wed, Aug 26, 2015 at 11:40 PM, Mike Miller <python-ideas at mgmiller.net>
wrote:
>
> With the major design decisions made, behold version 2 of my draft PEP on
string interpolation.
>
> It's now significantly shorter due to removal of most of the i18n related
discussion, pruning, as well as simplification of the prose itself.  I
don't expect many changes from here on:
>
>     https://bitbucket.org/mixmastamyk/docs/src/default/pep/pep-05XX.rst
>
> TL;DR:  Here is a summary table and comparisons with my current
understanding of the other proposals, please correct if they are now out of
date:
>
>
> String Interpolation PEP Comparison
> ===================================
>
>
> =================   =================   =================
=================
> PEP                 PEP 498             PEP 501             Draft PEP
> =================   =================   =================
=================
> Name                Format/f-string     Gen. Purpose Str…
Expression-string
> Prefix              f''                 i''                 e''
> Syntax              str.format()+       .format+Template+   str.format()+
> Returns             String join expr…   Object              Object
> Immediate Render    Yes                 No                  Yes
> Deferred Render     No                  Yes, str, mutable   Yes
> I18n Support        No                  Yes                 Input
available
> Escaping Hook       No                  No                  Yes, manual
> =================   =================   =================
=================
>

Is the Draft PEP column of the table supposed to have both "Immediate
Render" and "Deferred Render" as "Yes"? I'm hoping that's a typo, otherwise
I don't understand what it means at all.

> The table can be found here and updated via pull-request:
>
>
https://bitbucket.org/mixmastamyk/docs/src/default/pep/pep_comparison.rst
>
> -Mike
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/

Cody
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150827/93d9d7c6/attachment.html>


More information about the Python-ideas mailing list