Skip to content

Commit

Permalink
Add a repr of Slot objects
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewryanscott committed Oct 26, 2016
1 parent 2dcc4cd commit 21267ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sunvox/slot.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def __enter__(self):
def __exit__(self, type, value, traceback):
self.close()

def __repr__(self):
return '<Slot number={} process={!r}>'.format(self.number, self.process)

@classmethod
def next_available_slot(cls, process):
i = cls.allocation_map[process].index(False)
Expand Down

0 comments on commit 21267ba

Please sign in to comment.