Skip to content

some typos in utils.py #1017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ def __init__(self, order='min', f=lambda x: x):
elif order == 'max': # now item with max f(x)
self.f = lambda x: -f(x) # will be popped first
else:
raise ValueError("order must be either 'min' or max'.")
raise ValueError("order must be either 'min' or 'max'.")

def append(self, item):
"""Insert item at its correct position."""
Expand All @@ -762,7 +762,7 @@ def extend(self, items):
self.append(item)

def pop(self):
"""Pop and return the item (with min or max f(x) value
"""Pop and return the item (with min or max f(x) value)
depending on the order."""
if self.heap:
return heapq.heappop(self.heap)[1]
Expand Down