why?

Brian Quinlan brian at sweetapp.com
Mon Dec 2 18:23:08 EST 2002


> This is irrelevant. doing[1] should be the same as doing[1][0]
> in this particular case.
> 
> > > >>> doing[1][0] = 'i'
> > > Traceback (most recent call last):
> > >   File "<stdin>", line 1, in ?
> > > TypeError: object doesn't support item assignment
> > > >>>
> You can, if you say doing[1] = ('i') which to my (very newbie) 
> thinking is assignment of a tuple to a string. I can't see how 
> it is more valid to assign a tuple to a string, rather than a 
> string to a string.

This is your conceptual problem. Why do you think it matters what
doing[1] used to be? It doesn't. 

Cheers,
Brian





More information about the Python-list mailing list