abcd wrote:
> I recently came across a problem where I saw this error:
> "TypeError: unsubscriptable object"
> 
> How can I determine if an object is "scriptable" or "unscriptable"?

By trying to apply the subscript operator ('[<index>]'). If it raises a
TypeError, then it's not subscriptable.

But, as Larry Bates already pointed out, your real problem is a logic
error: you get an unsubscriptable object where you assumed you had a
subscriptable one.

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to