my fall,
I'l make better samble (missed ",")

On 17 янв, 18:45, KMax <mkostri...@gmail.com> wrote:
> Please find test code below
> If i remove format = lambda x: from defining db.a, no error appears
> ================
> Error traceback
> Traceback (most recent call last):
>   File "gluon/restricted.py", line 171, in restricted
>   File "C:/!Work/web2py/applications/test/models/db.py", line 9
>     format = '%(a)s')
>          ^
> SyntaxError: invalid syntax
>
> In file: C:\!Work\web2py\applications\test/models/db.py
> db = DAL('sqlite://storage.sqlite')       # if not, use SQLite or
> other DB
>
> db.define_table ('a',
>     SQLField('a'),
>     format = lambda x: "%s" % (x.a))
>
> db.define_table ('b',
>     SQLField('a',db.a)
>     format = '%(a)s')
>
> ============
> I guess there is some semantic issue. Please help.
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to