Difference between unindexable and unsubscriptable

Theerasak Photha hanumizzle at gmail.com
Wed Oct 11 01:46:36 EDT 2006


On 10/11/06, Ben Finney <bignose+hates-spam at benfinney.id.au> wrote:
> Jackson <jackson at hotmail.com> writes:
>
> > I would like to test if an object can accept:   obj[0]
>
> Then do so. Use the object in the way you want to use it, and catch
> any exceptions that you want to handle.

I'm trying to learn about style conventions in Python. How would use
of getattr compare?

-- Theerasak



More information about the Python-list mailing list