Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/bslatkin/effectivepython
/ next_overdue_book
Function
next_overdue_book
example_code/item_104.py:73–80 ·
view source on GitHub ↗
(queue, now)
Source
from the content-addressed store, hash-verified
71
pass
72
73
def
next_overdue_book(queue, now):
74
if
queue:
75
book = queue[-1]
76
if
book.due_date < now:
77
queue.pop()
78
return
book
79
80
raise
NoOverdueBooks
81
82
83
print(
"Example 4"
)
Callers
1
item_104.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected