Open sidharthism opened 1 year ago
Most probably using primitive type list
in trees/binary_heap.py", might be causing the issue.
def heapify(self, not_a_heap: list[Any], show_details: bool = False) -> None:
[Update]
Tried using typing.List
https://docs.python.org/3/library/typing.html?highlight=list#typing.List
from typing import Any, List
# ...
def heapify(self, not_a_heap: List[Any], show_details: bool = False) -> None:
Seem to fix the TypeError.
There are no errors in 3.9 or 3.10 --- 3.7 is ancient!
I guess we should make this backward compatible or change the packaging to indicate that 3.9 is the minimum supported release.
Meanwhile -- version 3.0.3 will import successfully under older version of Python
Checked with the latest python versions. It's working fine. And thank you for the update! It seems that the issue is only with versions after 3 i.e. 3.7 till 3.8.5. Making it either backward compatible or changing the packaging to indicate that 3.9 is the minimum supported release will do I suppose.
Upon importing pythonds3, while learning stacks as part of the course pythonds3,
The following error occured: