-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: C.A.M. Gerlach <[email protected]>
- Loading branch information
1 parent
f23e5d4
commit 67f0f03
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
PEP: 501 | ||
Title: General purpose string template literals | ||
Version: $Revision$ | ||
Last-Modified: $Date$ | ||
Author: Nick Coghlan <[email protected]>, Nick Humrich <[email protected]> | ||
Discussions-To: https://discuss.python.org/t/pep-501-reopen-general-purpose-string-template-literals/24625 | ||
Status: Draft | ||
|
@@ -435,7 +433,7 @@ accessing external programs, without the significant risks posed by running | |
``os.system`` or enabling the system shell when using the ``subprocess`` module | ||
APIs, which will provide an interface for running external programs inspired by that | ||
offered by the | ||
`Julia programming language <http://julia.readthedocs.org/en/latest/manual/running-external-programs/>`__, | ||
`Julia programming language <https://docs.julialang.org/en/v1/manual/running-external-programs/>`__, | ||
only with the backtick based ``\`cat $filename\``` syntax replaced by | ||
``t"cat {filename}"`` style template literals. (see more below) | ||
|
||
|
@@ -461,6 +459,8 @@ Unmatched braces:: | |
File "<stdin>", line 1 | ||
t'x={x' | ||
^ | ||
t'x={x' | ||
^ | ||
SyntaxError: missing '}' in template literal expression | ||
|
||
Invalid expressions:: | ||
|
@@ -620,11 +620,12 @@ This way, your function can provide the same API for both static and dynamic str | |
|
||
def my_safe_function(string_like_object: LiteralString | TemplateLiteral): | ||
... | ||
... | ||
|
||
Discussion | ||
========== | ||
|
||
Refer to :pep:`498` for additional discussion, as several of the points there | ||
Refer to :pep:`498` for previous discussion, as several of the points there | ||
also apply to this PEP. | ||
|
||
Support for binary interpolation | ||
|