From 097a688ec12d237ff0474eaaa440ac41733696cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Thu, 8 May 2025 06:07:14 +0200 Subject: [PATCH] Paths --- README.md | 4 ++-- index.html | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ea1af9d..88cacc8 100644 --- a/README.md +++ b/README.md @@ -1684,8 +1684,8 @@ from pathlib import Path ```python = .parent # Returns Path without the final component. = .name # Returns final component as a string. - = .stem # Returns final component w/o last extension. - = .suffix # Returns last extension prepended with a dot. + = .suffix # Returns name's last extension, e.g. '.py'. + = .stem # Returns name without last extension. = .parts # Returns all path's components as strings. ``` diff --git a/index.html b/index.html index 7536836..f8540c5 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@
- +
@@ -1430,8 +1430,8 @@ args = p.parse_args() <Path> = <Path>.parent # Returns Path without the final component. <str> = <Path>.name # Returns final component as a string. -<str> = <Path>.suffix # Returns name's last extension (e.g. '.py'). -<str> = <Path>.stem # Returns name without its last extension. +<str> = <Path>.suffix # Returns name's last extension, e.g. '.py'. +<str> = <Path>.stem # Returns name without last extension. <tup.> = <Path>.parts # Returns all path's components as strings.
<iter> = <Path>.iterdir()           # Returns directory contents as Path objects.
@@ -1591,8 +1591,8 @@ CompletedProcess(args=['bc', '<query>')                  # depending on whether any exception occurred.
 
-

Placeholders

<conn>.execute('<query>', <list/tuple>)        # Replaces every '?' with an item.
-<conn>.execute('<query>', <dict/namedtuple>)   # Replaces every ':<key>' with a value.
+

Placeholders

<conn>.execute('<query>', <list/tuple>)        # Replaces '?'s in query with values.
+<conn>.execute('<query>', <dict/namedtuple>)   # Replaces ':<key>'s with values.
 <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 every ':<key>' with value. +<cursor> = <conn>.execute(text('<query>'), …) # `<dict>`. Replaces ':<key>'s with values. with <conn>.begin(): ... # Exits the block with commit or rollback.
@@ -2940,7 +2940,7 @@ $ deactivate # Deactivates the active