Created
November 21, 2014 20:52
-
-
Save gergob/b53772fad51f54dab511 to your computer and use it in GitHub Desktop.
Gadget without respecting OOP encapsulation
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
my_iphone = Gadget(weight = 128, operating_system="iOS", battery_capacity=2800, screen_size=4) | |
print(my_iphone.weight) | |
print(my_iphone.operating_system) | |
print(my_iphone.battery_capacity) | |
print(my_iphone.screen_size) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment