[Tutor] error message

2009-07-08 Thread Steven Buck
I'm running a for loop which returns an error message after the third iteration (see out[4] at the bottom as evidence). I don't understand the error message. Although I'll continue to do my own digging to debug, I thought I'd give you all a shot. Thanks, -steve Python 2.6.2 (r262:71605, Apr 14

Re: [Tutor] error message

2009-07-08 Thread Steven Buck
nmin, nmax = self.MISSING_VALUES[fmt[-1]] error: unpack requires a string argument of length 1 In [4]: age Out[4]: {0: 22, 1: 51, 2: 42} In [5]: On Wed, Jul 8, 2009 at 1:12 PM, bob gailer bgai...@gmail.com wrote: Steven Buck wrote: I'm running a for loop which returns an error

Re: [Tutor] append question

2009-07-06 Thread Steven Buck
roadier...@googlemail.comwrote: 2009/7/5 Steven Buck bucks...@gmail.com: for i in len(test): testvar2.append(test[i][2]) I want testvar2 = [2,5,8] but instead I get the following error message: Traceback (most recent call last): File pyshell#34, line 1, in module for i

[Tutor] append question

2009-07-05 Thread Steven Buck
.append(test[i][2]) I want testvar2 = [2,5,8] but instead I get the following error message: Traceback (most recent call last): File pyshell#34, line 1, in module for i in len(test): TypeError: 'int' object is not iterable Any insight would be appreciated. Thanks Steve -- Steven

[Tutor] reading variables in a data set?

2009-07-04 Thread Steven Buck
Steve -- Steven Buck Ph.D. Student Department of Agricultural and Resource Economics University of California, Berkeley ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor