From 9d967f5980525ca736888ea60aa08309c9b3ca51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Fri, 9 May 2025 02:33:44 +0200 Subject: [PATCH] SQLite, Pygame --- README.md | 8 ++++---- index.html | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 88cacc8..8fe2c56 100644 --- a/README.md +++ b/README.md @@ -1907,8 +1907,8 @@ with : # Exits the block with commit() o ### Placeholders ```python -.execute('', ) # Replaces '?'s in query with values. -.execute('', ) # Replaces ':'s with values. +.execute('', ) # Replaces every question mark with an item. +.execute('', ) # Replaces every : with value. .executemany('', ) # Runs execute() multiple times. ``` * **Passed values can be of type str, int, float, bytes, None, or bool (stored as 1 or 0).** @@ -1931,7 +1931,7 @@ with : # Exits the block with commit() o from sqlalchemy import create_engine, text = create_engine('') # Url: 'dialect://user:password@host/dbname'. = .connect() # Creates a connection. Also .close(). - = .execute(text(''), …) # ``. Replaces ':'s with values. + = .execute(text(''), …) # ``. Replaces every : with value. with .begin(): ... # Exits the block with commit or rollback. ``` @@ -3048,7 +3048,7 @@ rect(, color, , width=0) # Also polygon(, color, po ```python = pg.font.Font(, size) # Loads TTF file. Pass None for default font. - = .render(text, antialias, color) # Background color can be specified at the end. + = .render(text, antialias, color) # Accepts background color as fourth argument. ``` ### Sound diff --git a/index.html b/index.html index f8540c5..23b6a23 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@
- +
@@ -1591,8 +1591,8 @@ CompletedProcess(args=['bc', '<query>') # depending on whether any exception occurred. -

Placeholders

<conn>.execute('<query>', <list/tuple>)        # Replaces '?'s in query with values.
-<conn>.execute('<query>', <dict/namedtuple>)   # Replaces ':<key>'s with values.
+

Placeholders

<conn>.execute('<query>', <list/tuple>)        # Replaces every question mark with an item.
+<conn>.execute('<query>', <dict/namedtuple>)   # Replaces every :<key> with value.
 <conn>.executemany('<query>', <coll_of_coll>)  # Runs execute() multiple times.
 
@@ -1612,7 +1612,7 @@ CompletedProcess(args=['bc', from sqlalchemy import create_engine, text <engine> = create_engine('<url>') # Url: 'dialect://user:password@host/dbname'. <conn> = <engine>.connect() # Creates a connection. Also <conn>.close(). -<cursor> = <conn>.execute(text('<query>'), …) # `<dict>`. Replaces ':<key>'s with values. +<cursor> = <conn>.execute(text('<query>'), …) # `<dict>`. Replaces every :<key> with value. with <conn>.begin(): ... # Exits the block with commit or rollback.
@@ -2496,7 +2496,7 @@ arc(<Surf>, color, <Rect>, from_rad, to_rad) 0) # Also polygon(<Surf>, color, points, width=0).
<Font> = pg.font.Font(<path/file>, size)        # Loads TTF file. Pass None for default font.
-<Surf> = <Font>.render(text, antialias, color)  # Background color can be specified at the end.
+<Surf> = <Font>.render(text, antialias, color)  # Accepts background color as fourth argument.
 

Sound

<Sound> = pg.mixer.Sound(<path/file/bytes>)     # WAV file or bytes/array of signed shorts.
 <Sound>.play/stop()                             # Also set_volume(<float>) and fadeout(msec).
@@ -2940,7 +2940,7 @@ $ deactivate                # Deactivates the active