8000 comment added · ammarlodhi255/python-src@14b5d4d · GitHub
[go: up one dir, main page]

Skip to content

Commit 14b5d4d

Browse files
committed
comment added
1 parent 1993f38 commit 14b5d4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OOP/class_and_static_methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def show_details(self):
1414
def show_num_of_chairs(self):
1515
print(Car.num_of_chairs) # Access class variable
1616

17-
@classmethod
17+
@classmethod # This decorator alters the functionality of our regular method to now accept the class instead of an instance of the class
1818
def set_num_of_chairs(cls, num_of_chairs):
1919
cls.num_of_chairs = num_of_chairs
2020

0 commit comments

Comments
 (0)
0