Skip to content

Commit 8421b8a

Browse files
committed
Fix code style issues with Black
1 parent 78ca7af commit 8421b8a

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed
Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
class Vector:
2-
"""
3-
Constructor
4-
5-
self: a reference to the object we are creating
6-
vals: a list of integers which are the contents of our vector
7-
"""
8-
def __init__(self, vals):
9-
self.vals = vals # Notice! We are using the keyword self to create a field or property (for Javascript users)
10-
print("Assigned values ", vals, " to vector.")
11-
12-
"""
2+
"""
3+
Constructor
4+
5+
self: a reference to the object we are creating
6+
vals: a list of integers which are the contents of our vector
7+
"""
8+
9+
def __init__(self, vals):
10+
self.vals = vals # Notice! We are using the keyword self to create a field or property (for Javascript users)
11+
print("Assigned values ", vals, " to vector.")
12+
13+
"""
1314
String Function
1415
1516
Converts the object to a string in readable format for programmers
1617
"""
17-
def __str__(self):
18-
return str(self.vals) # Returns the contents of the vector
19-
18+
19+
def __str__(self):
20+
return str(self.vals) # Returns the contents of the vector
21+
22+
2023
vec = Vector([2, 3, 2])
21-
print(str(vec)) # [2, 3, 2]
24+
print(str(vec)) # [2, 3, 2]

0 commit comments

Comments
 (0)