10000 TR updates, second round · realpython/materials@b1fdafb · GitHub
[go: up one dir, main page]

Skip to content

Commit b1fdafb

Browse files
committed
TR updates, second round
1 parent 0fbfa35 commit b1fdafb

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

python-protocol/adder_v4.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,9 @@ def add(self, x: float, y: float) -> float:
1717
return x + y
1818

1919

20-
class StrAdder:
21-
def add(self, x: str, y: str) -> str:
22-
return x + y
23-
24-
2520
def add(adder: Adder) -> None:
2621
print(adder.add(2, 3))
2722

2823

2924
add(IntAdder())
3025
add(FloatAdder())
31-
# add(StrAdder())

python-protocol/adder_v5.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,9 @@ def add(self, x: float, y: float) -> float:
1515
return x + y
1616

1717

18-
class StrAdder:
19-
def add(self, x: str, y: str) -> str:
20-
return x + y
21-
22-
2318
def add(adder: Adder) -> None:
2419
print(adder.add(2, 3))
2520

2621

2722
add(IntAdder())
2823
add(FloatAdder())
29-
add(StrAdder())

python-protocol/contents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(self):
3636
def create_content(self) -> str:
3737
return "Recording a video."
3838

39-
def add_vide(self, title: str, path: str) -> None:
39+
def add_video(self, title: str, path: str) -> None:
4040
self.videos.append(f"{title}: {path}")
4141
print(f"Video added: {title}")
4242

0 commit comments

Comments
 (0)
0