[web2py] Re: for... in usage

2014-02-02 Thread Massimo Di Pierro
let's try again: {{= TABLE(*[TR(TD(A(r.user,_href=URL(args=(r.name,r.value) for r in testdb]) }} I am not sure what this style is called. On Sunday, 2 February 2014 09:15:19 UTC-6, Multiplery wrote: > > I'm sorry, but it creates an error 'invalid syntax' > > Am Sonntag, 2. Februar 2014 14:5

Re: [web2py] Re: for... in usage

2014-02-02 Thread Don O'Hara
Hello Massimo - After reading the web2py reference manual closely, and working through some examples, your one liner makes perfect sense, and is quite elegant. How would you describe this style of programming; is it more pythonic, or web2py-ish, or functional, or something else? I came up through

[web2py] Re: for... in usage

2014-02-02 Thread Multiplery
well, no errer message, but still it does not work fine, since the page Shows only: at 0x0723B698> (everything else would work fine, so this isn't an error message) I'm sorry that I cause so many Problems :( Am Sonntag, 2. Februar 2014 14:51:33 UTC+1 schrieb Multiplery: > Hey guys, > I have a

[web2py] Re: for... in usage

2014-02-02 Thread Cliff Kachinske
Use Massimo's original reply, but count the left and right parentheses. On Sunday, February 2, 2014 8:51:33 AM UTC-5, Multiplery wrote: > > Hey guys, > I have a problem with the for in usage. > > I want an function which creates, depending on a db, URLs. > So in the db is a table with the fields

[web2py] Re: for... in usage

2014-02-02 Thread Multiplery
When you change the code to: {{=TABLE(*[TR(TD(A(r.user,_href=URL(args=(r.name,r.value for r in testdb])}} watch the different brackets, there is no [] anymore, but () But now there is this error message: response.write('\r\n', escape=False) ^ SyntaxError: invalid Syntax Am Sonnt

[web2py] Re: for... in usage

2014-02-02 Thread Multiplery
I'm sorry, but it creates an error 'invalid syntax' Am Sonntag, 2. Februar 2014 14:51:33 UTC+1 schrieb Multiplery: > > Hey guys, > I have a problem with the for in usage. > > I want an function which creates, depending on a db, URLs. > So in the db is a table with the fields 'name', 'user' 'value

[web2py] Re: for... in usage

2014-02-02 Thread Massimo Di Pierro
{{=TABLE(*[TR(TD(A(r.user,_href=URL(args=(r.name,r.value for r in testdb])}} On Sunday, 2 February 2014 07:51:33 UTC-6, Multiplery wrote: > > Hey guys, > I have a problem with the for in usage. > > I want an function which creates, depending on a db, URLs. > So in the db is a table with the