Skip to content

Commit 61dc040

Browse files
committed
Post final QA
1 parent c07eabf commit 61dc040

7 files changed

+14
-11
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
This folder provides the code examples for the Real Python tutorial [What Does -> Mean in Python Function Definitions?](https://realpython.com/what-does-mean-in-python-function-definitions/)
1+
# What Does -> Mean in Python Function Definitions?
2+
3+
This folder provides the code examples for the Real Python tutorial [What Does -> Mean in Python Function Definitions?](https://realpython.com/what-does-arrow-mean-in-python/)
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
game_stock = {"Dragon Quest": 5, "Final Fantasy": 1, "Age of Empires": 5}
2-
3-
41
def get_highest_stock_games(game_stock: dict[str, int]) -> dict[str, int]:
52
max_quantity = max(game_stock.values())
63
return {
@@ -10,4 +7,5 @@ def get_highest_stock_games(game_stock: dict[str, int]) -> dict[str, int]:
107
}
118

129

13-
print(f"Games with the highest stock: {get_highest_stock_games(game_stock)}")
10+
game_stock = {"Dragon Quest": 5, "Final Fantasy": 1, "Age of Empires": 5}
11+
print("Games with the highest stock:", get_highest_stock_games(game_stock))
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
my_number = 32
2+
print(f"{my_number = }")
3+
24
my_number = "32"
5+
print(f"{my_number = }")

what-does-arrow-mean-in-python/mismatched_return_type_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ def get_number_of_titles(titles: list[str]) -> str:
33

44

55
games = ["Dragon Quest", "Final Fantasy", "Age of Empires"]
6-
print(f"Number of titles: {get_number_of_titles(games)}")
6+
print("Number of titles:", get_number_of_titles(games))
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
def find_keyword_in_titles(titles: list[str], keyword: str) -> None:
2-
print(f"Titles that contain the keyword {keyword}")
2+
print("Titles that contain the keyword:", keyword)
33
for game_title in titles:
44
if keyword in game_title:
5-
print(f"{game_title}")
5+
print(game_title)
66

77

88
games = ["Dragon Quest", "Final Fantasy", "Age of Empires"]
9-
find_keyword_in_titles(games, "Final")
9+
find_keyword_in_titles(games, "es")

what-does-arrow-mean-in-python/simple_type_hint_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ def get_number_of_titles(titles: list[str]) -> int:
33

44

55
games = ["Dragon Quest", "Final Fantasy", "Age of Empires"]
6-
print(f"Number of titles: {get_number_of_titles(games)}")
6+
print("Number of titles:", get_number_of_titles(games))

what-does-arrow-mean-in-python/str_return_type_hint_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ def get_game_recommendation(titles: list[str]) -> str:
66

77

88
games = ["Dragon Quest", "Final Fantasy", "Age of Empires"]
9-
print(f"Random recommendation: {get_game_recommendation(games)}")
9+
print("Random recommendation:", get_game_recommendation(games))

0 commit comments

Comments
 (0)