Skip to content

Commit 7c62e97

Browse files
author
Vimal A R
authored
Merge pull request #1 from praython/master
fixed fetching instance attribute 100.
2 parents 09e5aac + 8e40afc commit 7c62e97

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

06-class-attributes-1.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def set_val(self):
1717

1818
dd = YourClass()
1919
dd.classy # This will fetch the class attribute 10.
20+
dd.set_val()
2021
dd.insty # This will fetch the instance attribute 100.
2122

2223
# Once `dd` is instantiated, we can access both the class and instance

0 commit comments

Comments
 (0)