I know that the topic is very old but I am bumping my head for hours now.

Why is the '&' missing?

I am trying to implement something similar to one of my projects but cannot 
seem to find the logic behind this syntax (...I could use it like this but 
I need to understand how it works!)

Can somebody please elaborate on this? Is it web2py "magic", pydal "magic" 
or something pythonic I am missing?

Many thanks 

On Sunday, July 3, 2011 at 6:18:29 PM UTC+3, Luther Goh Lu Feng wrote:
>
> Looking through the source code, 
>
> I deduce that 
>
> db(db.connection.source==auth.user_id) 
> (db.connection.target==request.args(1)).delete() 
>
> is the same as 
>
> db((db.connection.source==auth.user_id)) & 
> (db.connection.target==request.args(1))).delete() 
>
>
> Is this new syntax? I did not recall reading it in the book. Pls point 
> me to the section in the book if it is already there. Tks! 
>
> On Jun 12, 12:09 am, Massimo Di Pierro <massimo.dipie...@gmail.com> 
> wrote: 
> > Here is the source of the facebook clone 
> > 
> >  web2py.app.friends.w2p 
> > 1002KViewDownload

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to