Skip to content
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

data made optional in public API #249

Merged
merged 5 commits into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion pydatastructs/trees/heaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _heapify(self, i):
else:
break

def insert(self, key, data):
def insert(self, key, data=None):
"""
Insert a new element to the heap according to heap property.

Expand Down
2 changes: 1 addition & 1 deletion pydatastructs/trees/tests/test_heaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def test_BinaryHeap():

assert raises(IndexError, lambda: max_heap.extract())

max_heap.insert(100, 100)
max_heap.insert(100)
czgdp1807 marked this conversation as resolved.
Show resolved Hide resolved
max_heap.insert(19, 19)
max_heap.insert(36, 36)
max_heap.insert(17, 17)
Expand Down