nbro/andz

Not all methods of the LinearProbingHashTable class check if the input key is Hashable

nbro opened this issue · 1 comments

nbro commented

The following methods do not check if the key is an instance of an Hashable

  • get
  • put

whereas the following do

  • delete

Note: update tests to reflect changes.

nbro commented

The methods get and put did not specifically check if the key is an instance of Hashable, but, anyway, they would raise a TypeError in that case, because they perform at least one call to _hash_code method, which uses the Python built-in function hash.