Skip to content

Instantly share code, notes, and snippets.

@HH0718
Created December 25, 2020 17:40
Show Gist options
  • Save HH0718/987ac5f6acfb70e977fc637327755a91 to your computer and use it in GitHub Desktop.
Save HH0718/987ac5f6acfb70e977fc637327755a91 to your computer and use it in GitHub Desktop.
class MyClass:
def __init__(self, value1, value2):
self.value1 = value1
self.value2= value2
if __name__ == "__main__":
init_class_my_class = MyClass("my_new_value1", "my_new_value2")
print(init_class_my_class.__dict__)
init_class_my_class.value3 = "my_new_value3"
print(init_class_my_class.__dict__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment