Re: 'str' object does not support item assignment

2012-09-23 Thread Mark Lawrence
On 23/09/2012 19:31, jimbo1qaz wrote: spots[y][x]=mark fails with a "'str' object does not support item assignment" error,even though: a=[["a"]] a[0][0]="b" and: a=[["a"]] a[0][0]=100 both work. Spots is a nested list created as a co

Re: 'str' object does not support item assignment

2012-09-23 Thread Andrea Crotti
On 09/23/2012 07:31 PM, jimbo1qaz wrote: spots[y][x]=mark fails with a "'str' object does not support item assignment" error,even though: a=[["a"]] a[0][0]="b" and: a=[["a"]] a[0][0]=100 both work. Spots is a nested list created as a co

Re: 'str' object does not support item assignment

2012-09-23 Thread jimbo1qaz
On Sunday, September 23, 2012 11:48:11 AM UTC-7, MRAB wrote: > On 2012-09-23 19:31, jimbo1qaz wrote: > > > spots[y][x]=mark fails with a "'str' object does not support item > > assignment" error,even though: > > >>>> a=[["a"]] &

Re: 'str' object does not support item assignment

2012-09-23 Thread MRAB
On 2012-09-23 19:31, jimbo1qaz wrote: spots[y][x]=mark fails with a "'str' object does not support item assignment" error,even though: a=[["a"]] a[0][0]="b" and: a=[["a"]] a[0][0]=100 both work. Spots is a nested list created as a copy

Re: 'str' object does not support item assignment

2012-09-23 Thread Ian Kelly
On Sun, Sep 23, 2012 at 12:31 PM, jimbo1qaz wrote: > spots[y][x]=mark fails with a "'str' object does not support item assignment" > error,even though: >>>> a=[["a"]] >>>> a[0][0]="b" > and: >>>> a=[["a&

Re: 'str' object does not support item assignment

2012-09-23 Thread jimbo1qaz
On Sunday, September 23, 2012 11:31:41 AM UTC-7, jimbo1qaz wrote: > spots[y][x]=mark fails with a "'str' object does not support item assignment" > error,even though: > > >>> a=[["a"]] > > >>> a[0][0]="b" > >

'str' object does not support item assignment

2012-09-23 Thread jimbo1qaz
spots[y][x]=mark fails with a "'str' object does not support item assignment" error,even though: >>> a=[["a"]] >>> a[0][0]="b" and: >>> a=[["a"]] >>> a[0][0]=100 both work. Spots is a nested list created as a copy of another list. -- http://mail.python.org/mailman/listinfo/python-list