PEP 501: Explicit note regarding prerendering templates

This commit is contained in:
Nick Coghlan 2015-08-23 14:17:45 +10:00
parent 1c7e1613cb
commit e4bd0c9b1e
1 changed files with 11 additions and 0 deletions

View File

@ -462,6 +462,17 @@ Since the proposed operator is useful without binary interpolation support, and
such support can be readily added later, further consideration of binary
interpolation is considered out of scope for the current PEP.
Interoperability with str-only interfaces
-----------------------------------------
For interoperability with interfaces that only accept strings, interpolation
templates can be prerendered with ``str``, rather than delegating the rendering
to the called function.
This reflects the key difference from PEP 498, which *always* eagerly applies]
the default rendering, without any convenient way to decide to do something
different.
Preserving the raw template string
----------------------------------