From 40c12e4419bbfb85c59c528e017ff18949caa243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Fri, 16 May 2025 23:10:22 +0200 Subject: [PATCH] Struct --- README.md | 8 ++++---- index.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e911850..756b62b 100644 --- a/README.md +++ b/README.md @@ -1741,7 +1741,7 @@ shutil.rmtree() # Deletes the directory. = .close() # Returns None if last command exited with returncode 0. ``` -#### Sends '1 + 1' to the basic calculator and captures its output: +#### Sends "1 + 1" to the basic calculator and captures its output: ```python >>> subprocess.run('bc', input='1 + 1\n', capture_output=True, text=True) CompletedProcess(args='bc', returncode=0, stdout='2\n', stderr='') @@ -1910,7 +1910,7 @@ with : # Exits the block with commit() o ### Placeholders ```python .execute('', ) # Replaces every question mark with an item. -.execute('', ) # Replaces every : with value. +.execute('', ) # Replaces every : with a value. .executemany('', ) # Runs execute() multiple times. ``` * **Passed values can be of type str, int, float, bytes, None, or bool (stored as 1 or 0).** @@ -1999,8 +1999,8 @@ Struct ```python from struct import pack, unpack - = pack('', [, ...]) # Packs numbers according to format string. - = unpack('', ) # Use iter_unpack() to get iterator of tuples. + = pack('', [, ...]) # Packs numbers according to format string. + = unpack('', ) # Use iter_unpack() to get iterator of tuples. ``` ```python diff --git a/index.html b/index.html index ef71033..02786fc 100644 --- a/index.html +++ b/index.html @@ -1473,7 +1473,7 @@ shutil.rmtree(<path>) # Deletes t <int> = <pipe>.close() # Returns None if last command exited with returncode 0. -

Sends '1 + 1' to the basic calculator and captures its output:

>>> subprocess.run('bc', input='1 + 1\n', capture_output=True, text=True)
+

Sends "1 + 1" to the basic calculator and captures its output:

>>> subprocess.run('bc', input='1 + 1\n', capture_output=True, text=True)
 CompletedProcess(args='bc', returncode=0, stdout='2\n', stderr='')
 
@@ -1597,7 +1597,7 @@ CompletedProcess(args=['bc', Placeholders
<conn>.execute('<query>', <list/tuple>)        # Replaces every question mark with an item.
-<conn>.execute('<query>', <dict/namedtuple>)   # Replaces every :<key> with value.
+<conn>.execute('<query>', <dict/namedtuple>)   # Replaces every :<key> with a value.
 <conn>.executemany('<query>', <coll_of_coll>)  # Runs execute() multiple times.
 
@@ -1665,8 +1665,8 @@ CompletedProcess(args=['bc', from struct import pack, unpack -<bytes> = pack('<format>', <num_1> [, ...]) # Packs numbers according to format string. -<tuple> = unpack('<format>', <bytes>) # Use iter_unpack() to get iterator of tuples. +<bytes> = pack('<format>', <el_1> [, ...]) # Packs numbers according to format string. +<tuple> = unpack('<format>', <bytes>) # Use iter_unpack() to get iterator of tuples.