Skip to content

Commit 0c58a67

Browse files
Update LuisOlivaresJ.py
Additional comments
1 parent ba5f354 commit 0c58a67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Roadmap/23 - SINGLETON/python/LuisOlivaresJ.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __new__(cls, *args, **kgargs):
1818
print(f"First instance: {s1}")
1919
s2 = Singleton()
2020
print(f"Second instance: {s2}")
21-
print(f"s1 is s2: {s1 is s2}")
21+
print(f"s1 is s2?: {s1 is s2}")
2222

2323

2424
"""
@@ -46,7 +46,7 @@ def __new__(cls, id: str, username: str, name: str, email: str):
4646
return cls._instance
4747

4848

49-
# These are instance attributes. If __init__ exist, it will overwrite class attributes
49+
# These are instance attributes. If __init__ exist, get_user() method will point to these instance attributes istead the class attributes.
5050
"""
5151
def __init__(self, id: str, username: str, name: str, email: str):
5252
print("Inside init")
@@ -90,4 +90,4 @@ def clean_user(self):
9090
print("\nUsing clear_user method...:\n")
9191
luis.clean_user()
9292
oscar = User("2", "OscarOlivares", "Oscar", "oscar@Dev")
93-
print(f"User oscar: {oscar.get_user()}")
93+
print(f"User oscar: {oscar.get_user()}")

0 commit comments

Comments
 (0)