On Sep 25, 10:23 am, annet <[email protected]> wrote:
> compute=lambda r: str(r['selector']) + ' ' + str(r['property'])
>
> is syntactically incorrect. What is the correct syntax?

The syntax of that command, on its own, is correct.  Perhaps you can
try dumping the contents of the argument to see whether it contains
the keys you think it does:

def mycompute(r):
    print 'In mycompute(r), r = ' + r
    return str(r['selector']) + ' ' + str(r['property'])

db.define_table('css_selectorproperty',
    Field('selector',length=48,default='',notnull=True),
    Field('property',length=36,default='',notnull=True),
 
Field('name',length=84,default='',notnull=True,compute=mycompute,writable=False,readable=False),
    migrate=False)

Then check the shell window for messages?

Reply via email to