Skip to content

Instantly share code, notes, and snippets.

@XanderVi
Created November 1, 2019 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save XanderVi/94210dfd4801741727870bf9dd271990 to your computer and use it in GitHub Desktop.
Save XanderVi/94210dfd4801741727870bf9dd271990 to your computer and use it in GitHub Desktop.
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