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, query, p) for p in params ] > > what I don't get is that it worked on mac os x 10.5 (python 2.5.x) but > it no longer works. I tried the following and it works : > > r = [] > for p in params: > r.append(self.__formatData(paramProcFunc, query, p)) > params = r > > Does anyone understand what is going on here? > > Thank you, > Gabriel
That isn't an error that should occur, not least because _[1] isn't a valid name. Can you post a full traceback? Richard. -- http://mail.python.org/mailman/listinfo/python-list