Python reverses the order of __contains__(seq,obj) arguments, so:
(db.posts.tags in ['web2py'])

would have to be:
('web2py' in db.posts.tags)
(['web2py','cool'] in db.posts.tags)

Not all bad,

Robin

On Feb 1, 9:54 am, Robin B <robi...@gmail.com> wrote:
> A syntax for batch put/insert:
>
> db.posts.insert([attrs1,attrs2])
>
> db.posts << [attrs1,attrs2]
>
> Robin
>
> On Feb 1, 9:35 am, Robin B <robi...@gmail.com> wrote:
>
> > Instead of:
> > db.posts[0] = db.posts[5] #for insert
>
> > How about:
> > db.posts << db.posts[5] # operator.__lshift__(a, b)
>
> > and also:
> > db.posts << db.posts(**attrs) # default attrs
>
> > Robin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@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