Skip to content

Commit f8f4ad4

Browse files
authored
Final QA including new example (#419)
1 parent 16bb9c6 commit f8f4ad4

11 files changed

+31
-55
lines changed
-45 Bytes
Binary file not shown.

python-operator-module/calculate_modulus_deserialize_failed.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

python-operator-module/calculate_modulus_deserialize_fixed.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

python-operator-module/calculate_modulus_serialize_deserialize.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

python-operator-module/methodcaller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Musician:
1111

1212
def get_full_name(self, last_name_first=False):
1313
if last_name_first:
14-
return f"{self.lname} {self.fname}"
14+
return f"{self.lname}, {self.fname}"
1515
return f"{self.fname} {self.lname}"
1616

1717

-32 Bytes
Binary file not shown.

python-operator-module/operator_mod_deserialization.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

python-operator-module/operator_mod_serialization.py

Lines changed: 0 additions & 8 deletions
This file was deleted.
86 Bytes
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import pickle
2+
3+
with open("operators.pkl", mode="rb") as f:
4+
operators = pickle.load(f)
5+
6+
7+
def perform_operation(op_string, number1, number2):
8+
return operators[op_string](number1, number2)
9+
10+
11+
print(perform_operation("*", 10, 5))

0 commit comments

Comments
 (0)