MCPcopy Create free account
hub / github.com/dabeaz/python-cookbook / Item

Class Item

src/1/implementing_a_priority_queue/example.py:20–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19# Example use
20class Item:
21 def __init__(self, name):
22 self.name = name
23 def __repr__(self):
24 return 'Item({!r})'.format(self.name)
25
26q = PriorityQueue()
27q.push(Item('foo'), 1)

Callers 1

example.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected