Created
November 1, 2019 07:46
-
-
Save XanderVi/94210dfd4801741727870bf9dd271990 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
import copy | |
class Human: | |
def __init__(self, name, birthday, gender): | |
self.name = name | |
self.birthday = birthday | |
self.gender = gender | |
def __repr__(self): | |
return f'My name is {self.name}, I was born at {self.birthday}, and I am a {self.gender}' | |
first = Human('John', '2000-01-01', 'male') | |
second = copy.deepcopy(first) | |
print(second) | |
print(isinstance(second, Human)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment