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 it worked on mac os x

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

2009-12-09 Thread Richard Thomas
On Dec 9, 10:17 am, Gabriel Rossetti gabriel.rosse...@arimaz.com 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

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

2009-12-09 Thread Dave Angel
Gabriel Rossetti wrote: div class=moz-text-flowed style=font-family: -moz-fixedHello 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

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 gabriel.rosse...@arimaz.com 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 list

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

2009-12-09 Thread Gabriel Rossetti
Dave Angel wrote: Gabriel Rossetti wrote: div class=moz-text-flowed style=font-family: -moz-fixedHello 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

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

2009-12-09 Thread Hrvoje Niksic
Richard Thomas chards...@gmail.com 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

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 ] what I don't

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

2009-12-09 Thread Dave Angel
Gabriel Rossetti wrote: Dave Angel wrote: Gabriel Rossetti wrote: div class=moz-text-flowed style=font-family: -moz-fixedHello 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