Skip to content

Commit 3106dd0

Browse files
committed
Private Variables
1 parent 8941a51 commit 3106dd0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

OOP/P10_PrivateVariable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ def displayInfo(self):
1515
myObj = Person('Omkar')
1616
myObj.displayInfo()
1717
print(myObj.name) # Can be accessed as it is public variable
18-
# print(myObj.__education) # Throws an error
18+
# print(myObj.__education) # Throws an error
1919
print(myObj._Person__education) # Private variable can be accessed like this but NEVER EVER
2020
# do this please!!!

0 commit comments

Comments
 (0)