What is connectionaa.smthng supposed to reference? You cannot reference a table that is not yet defined.
Anyway db.xxx is the same as db['xxx'] On 30 Giu, 13:48, Rick <sababa.sab...@gmail.com> wrote: > Hi, > > I'm trying to write loops in db.py: > > letters = ['a', 'b', 'c', 'd'] > for i in range(len(letters)): > for j in range(len(letters)): > > db.define_table('connection'+letters[i]+letters[j], > SQLField('smthng', db.???letters[i])) > > What should I use instead of ??? to make the computer understand that > as db.a when i=0 and j=0? > > Thanks in advance for help!