TypeError: unhashable type

sh sh1232 at yahoo.com
Tue Jun 6 11:38:44 EDT 2000


This works without a glitch in the command line interpreter:
    segments = {}        # dictionary type
    segment = []
    # populate segment
    segments[segment[0]] = segment[len(segment)-1]

BUT, when I run it from the DOS prompt: "python segments.py", I got error
message:
    TypeError: unhashable type.

Any explanation is appreciated.  Thanks.
- sh





More information about the Python-list mailing list