How to determine if something is hashable?

Andrew Post apost at cbmi.upmc.edu
Tue Jun 26 21:32:24 EDT 2001


That's what I was looking for. Thanks for the tip!

Andrew

Remco Gerlich wrote:

> 
> In that case, I don't see what else could raise TypeError though.
> 
> But you can try more explicitly with:
> 
> try:
>    hash(valList[i])
> except TypeError:
>    ...
> 
> 





More information about the Python-list mailing list