person.py 266 B

123456789101112
  1. class Person(object):
  2. """defines a Person"""
  3. def __init__(self, id):
  4. self.id = id
  5. self.state = 0
  6. def __str__(self):
  7. return '{0}: {1}'.format(self.id, self.state)
  8. def __eq__(self, id):
  9. return self.id == id