error converting list to tuple

john fabiani jfabiani at yolo.com
Tue May 18 11:25:13 EDT 2004


Stefan Seefeld wrote:
> hi there,
> 
> I'm trying to convert a tuple to a list,
> and get a 'TypeError: list objects are unhashable'.
> 
> Can anybody enlighten me as to the possible causes
> for this ? Where does hashing come into play during
> this conversion ?
> 
> Could it be that my runtime is corrupted ?
> The code is executed from within a C++ extension
> module I'm developing...
> 
> Thanks for any help,
>         Stefan
> 
> PS: I'm using python 2.3.3 in case that matters
> 
> 
God I can't believe I think I can answer this question:
mylist=[]
t=('123','hello','bye')
for count in range(0,len(t)):
   mylist.append(t[count])

It works for me.
John



More information about the Python-list mailing list