Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: C.A.M. Gerlach <[email protected]>
  • Loading branch information
nhumrich and CAM-Gerlach committed Mar 14, 2023
1 parent f23e5d4 commit 67f0f03
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pep-0501.txt
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
Expand Down Expand Up @@ -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)

Expand All @@ -461,6 +459,8 @@ Unmatched braces::
File "<stdin>", line 1
t'x={x'
^
t'x={x'
^
SyntaxError: missing '}' in template literal expression

Invalid expressions::
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 67f0f03

Please sign in to comment.