Skip to content

Commit 856223d

Browse files
committed
Responded to Geir's latest comments and suggestions
1 parent 42c65bd commit 856223d

File tree

2 files changed

+6
-6
lines changed
  • python-sqlite-sqlalchemy/project/examples

2 files changed

+6
-6
lines changed

python-sqlite-sqlalchemy/project/examples/example_1/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ def main():
105105
) as filepath:
106106
data = get_data(filepath)
107107

108-
# Get the total number of books printed by each publisher
108+
# Get the number of books printed by each publisher
109109
books_by_publisher = get_books_by_publisher(data, ascending=False)
110110
for publisher, total_books in books_by_publisher.items():
111111
print(f"Publisher: {publisher}, total books: {total_books}")
112112
print()
113113

114-
# Get the total number of authors each publisher publishes
114+
# Get the number of authors each publisher publishes
115115
authors_by_publisher = get_authors_by_publisher(data, ascending=False)
116116
for publisher, total_authors in authors_by_publisher.items():
117117
print(f"Publisher: {publisher}, total authors: {total_authors}")

python-sqlite-sqlalchemy/project/examples/example_2/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
def get_books_by_publishers(session, ascending=True):
17-
"""Get a list of publisher and the total number of books they've published
17+
"""Get a list of publishers and the number of books they've published
1818
1919
Args:
2020
session: database session to use
@@ -39,7 +39,7 @@ def get_books_by_publishers(session, ascending=True):
3939

4040

4141
def get_authors_by_publishers(session, ascending=True):
42-
"""Get a list of publisher and the total number of authors they've published
42+
"""Get a list of publishers and the number of authors they've published
4343
4444
Args:
4545
session: database session to use
@@ -177,13 +177,13 @@ def main():
177177
Session.configure(bind=engine)
178178
session = Session()
179179

180-
# Get the total number of books printed by each publisher
180+
# Get the number of books printed by each publisher
181181
books_by_publisher = get_books_by_publishers(session, ascending=False)
182182
for row in books_by_publisher:
183183
print(f"Publisher: {row.name}, total books: {row.total_books}")
184184
print()
185185

186-
# Get the total number of authors each publisher publishes
186+
# Get the number of authors each publisher publishes
187187
authors_by_publisher = get_authors_by_publishers(session)
188188
for row in authors_by_publisher:
189189
print(f"Publisher: {row.name}, total authors: {row.total_authors}")

0 commit comments

Comments
 (0)