Difference between unindexable and unsubscriptable

Ben Finney bignose+hates-spam at benfinney.id.au
Wed Oct 11 01:56:26 EDT 2006


"Theerasak Photha" <hanumizzle at gmail.com> writes:

> 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?

I'm having trouble knowing what you need explained.

You have available to you an interactive Python interpreter, and the
documentation. Can you show us some sessions in the interpreter that
you still find confusing after you read the relevant documentation?

-- 
 \       "When I get new information, I change my position. What, sir, |
  `\          do you do with new information?"  -- John Maynard Keynes |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list