Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
20
class
Item:
21
def
__init__(self, name):
22
self.name = name
23
def
__repr__(self):
24
return
'Item({!r})'
.format(self.name)
25
26
q = PriorityQueue()
27
q.push(Item(
'foo'
), 1)
Callers
1
example.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected