Yves Glodt wrote: > if I do this: > > for row in sqlsth: > ________pkcolumns.append(row[0].strip()) > ________etc > > without a prior: > > pkcolumns = []; > > I get this error on first iteration: > UnboundLocalError: local variable 'pkcolums' referenced before assignment > > I guess that's normal as it's the way python works...?!? > > My question is: Is there no way to append to a non existing list?
how do you expect Python to figure out what kind of empty object you want ? </F> -- http://mail.python.org/mailman/listinfo/python-list