PEP 501: Explicit note regarding prerendering templates
This commit is contained in:
parent
1c7e1613cb
commit
e4bd0c9b1e
11
pep-0501.txt
11
pep-0501.txt
|
@ -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
|
such support can be readily added later, further consideration of binary
|
||||||
interpolation is considered out of scope for the current PEP.
|
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
|
Preserving the raw template string
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue