On 09/06/2012 10:05 AM, Alan Gauld wrote: > On 06/09/12 14:56, Ray Jones wrote: >> I have a multiple 'if' expression that I need to drastically reduce in >> size, both for readability and to keep errors from creeping in. >> >> For example, I would like to have the variable 'test' point to the a >> location 'grid[rcount-1][ccount-1]' so that everywhere I would use >> 'grid.....', I could replace it with 'test' How would I accomplish that? > > > I may have missed some messages but this is context free. > What are these multiple if statements? > Why would "reducing" them improve readability? It might make them > shorter but more cryptic. > > As to the other question, is > > test = grid[rcount-1][ccount-1] > > too obvious? > I went out to the kitchen for a bit to eat an hour or so ago and suddenly did a face-palm! Duh!
I'm going to have to quit dog-sitting for my niece - these all-nighters are killing my thinking ability! Ray _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor