Re: UnboundLocalError: local variable '_[1]' referenced before assignment

2009-12-09 Thread Dave Angel
Gabriel Rossetti wrote: Dave Angel wrote: Gabriel Rossetti wrote: Hello everyone, I get this error on python 2.6.1 on mac os x 10.6 : UnboundLocalError: local variable '_[1]' referenced before assignment here's the code that raises this: params = [ self.__formatData(param

Re: UnboundLocalError: local variable '_[1]' referenced before assignment

2009-12-09 Thread Terry Reedy
Gabriel Rossetti wrote: Gabriel Rossetti wrote: I get this error on python 2.6.1 on mac os x 10.6 : UnboundLocalError: local variable '_[1]' referenced before assignment here's the code that raises this: params = [ self.__formatData(paramProcFunc, query, p) for p in params

Re: UnboundLocalError: local variable '_[1]' referenced before assignment

2009-12-09 Thread Hrvoje Niksic
Richard Thomas writes: > That isn't an error that should occur, not least because _[1] isn't a > valid name. Can you post a full traceback? The name _[n] is used internally when compiling list comprehensions. The name is chosen precisely because it is not an (otherwise) valid identifier. For ex

Re: UnboundLocalError: local variable '_[1]' referenced before assignment

2009-12-09 Thread Gabriel Rossetti
Dave Angel wrote: Gabriel Rossetti wrote: Hello everyone, I get this error on python 2.6.1 on mac os x 10.6 : UnboundLocalError: local variable '_[1]' referenced before assignment here's the code that raises this: params = [ self.__formatData(paramProcFunc, query, p)

Re: UnboundLocalError: local variable '_[1]' referenced before assignment

2009-12-09 Thread Bruno Desthuilliers
Richard Thomas a écrit : On Dec 9, 10:17 am, Gabriel Rossetti wrote: UnboundLocalError: local variable '_[1]' referenced before assignment That isn't an error that should occur, not least because _[1] isn't a valid name It's an internal identifier used in l

Re: UnboundLocalError: local variable '_[1]' referenced before assignment

2009-12-09 Thread Dave Angel
Gabriel Rossetti wrote: Hello everyone, I get this error on python 2.6.1 on mac os x 10.6 : UnboundLocalError: local variable '_[1]' referenced before assignment here's the code that raises this: params = [ self.__formatData(paramProcFunc, query, p) for p in params ] what

Re: UnboundLocalError: local variable '_[1]' referenced before assignment

2009-12-09 Thread Richard Thomas
On Dec 9, 10:17 am, Gabriel Rossetti wrote: > Hello everyone, > > I get this error on python 2.6.1 on mac os x 10.6 : > > UnboundLocalError: local variable '_[1]' referenced before assignment > > here's the code that raises this: > > params = [ self.__fo

UnboundLocalError: local variable '_[1]' referenced before assignment

2009-12-09 Thread Gabriel Rossetti
Hello everyone, I get this error on python 2.6.1 on mac os x 10.6 : UnboundLocalError: local variable '_[1]' referenced before assignment here's the code that raises this: params = [ self.__formatData(paramProcFunc, query, p) for p in params ] what I don't get is that i