[Python-checkins] Replace backquote with command substitution in subprocess doc example (GH-13941)

Gregory P. Smith webhook-mailer at python.org
Tue Jul 16 10:55:48 EDT 2019


https://github.com/python/cpython/commit/6a61714cde7037cd9a1bcc11ecccb17fe3081295
commit: 6a61714cde7037cd9a1bcc11ecccb17fe3081295
branch: master
author: David Jones <drj at pobox.com>
committer: Gregory P. Smith <greg at krypto.org>
date: 2019-07-16T07:55:19-07:00
summary:

Replace backquote with command substitution in subprocess doc example (GH-13941)

Replace backquotes with POSIXy command substitution in example.

files:
M Doc/library/subprocess.rst
M Doc/tools/susp-ignored.csv

diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index af338795dae3..7e1e3f942c1c 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -1166,12 +1166,12 @@ In the following examples, we assume that the relevant functions have already
 been imported from the :mod:`subprocess` module.
 
 
-Replacing /bin/sh shell backquote
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Replacing :program:`/bin/sh` shell command substitution
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 .. code-block:: bash
 
-   output=`mycmd myarg`
+   output=$(mycmd myarg)
 
 becomes::
 
@@ -1182,7 +1182,7 @@ Replacing shell pipeline
 
 .. code-block:: bash
 
-   output=`dmesg | grep hda`
+   output=$(dmesg | grep hda)
 
 becomes::
 
@@ -1199,7 +1199,7 @@ be used directly:
 
 .. code-block:: bash
 
-   output=`dmesg | grep hda`
+   output=$(dmesg | grep hda)
 
 becomes::
 
diff --git a/Doc/tools/susp-ignored.csv b/Doc/tools/susp-ignored.csv
index fcf556ec0daf..80757752388f 100644
--- a/Doc/tools/susp-ignored.csv
+++ b/Doc/tools/susp-ignored.csv
@@ -218,8 +218,6 @@ library/stdtypes,,:len,s[len(s):len(s)]
 library/stdtypes,,::,>>> y = m[::2]
 library/stdtypes,,::,>>> z = y[::-2]
 library/string,,`,"!""#$%&'()*+,-./:;<=>?@[\]^_`{|}~"
-library/subprocess,,`,"output=`dmesg | grep hda`"
-library/subprocess,,`,"output=`mycmd myarg`"
 library/tarfile,,:bz2,
 library/tarfile,,:compression,filemode[:compression]
 library/tarfile,,:gz,



More information about the Python-checkins mailing list