Last active
June 24, 2024 06:09
-
-
Save jmquintana79/a1cd28ced6a7660f24832c3715dbd254 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Credentials(): | |
def __init__(self): | |
self.user = "user" | |
self.password = "password" | |
class Service(Credentials): | |
def __init__(self): | |
super().__init__() | |
print(self.user) | |
s = Service() | |
#[out]: "user" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Credentials(): | |
def __init__(self, user, password): | |
self.user = user | |
self.password = password | |
class Service(Credentials): | |
def __init__(self, user, password): | |
super().__init__(user, password) | |
print(self.user) | |
s = Service() | |
#[out]: "user" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment