I could do that, but I pass a tuple... I know that an hard parsing since
most of the time trailing comma is just strip out I think... I saw a tuple
in the DAL : https://code.google.com/p/web2py/source/detail?r=6eed7c7e3ab5

So, I thougth it could take a tuple as well...

Your solution seems cleaner then a tuple anyway.

Thanks

Richard


On Fri, Apr 12, 2013 at 3:16 PM, Niphlod <niph...@gmail.com> wrote:

> uhm..... I think that this particular case should be retained as it is:
> belongs accepts either a list or a set, but not a string, and **should**
> fail when you pass to it a string instead of a list.
>
> either way your code should do
> possible_items = request.vars.items
> if isinstance(possible_items, str):
>       possible_items = [possible_items]
> results = db(db.table.belongs(possible_items))
>
>
>
>  --
>
> ---
> 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/groups/opt_out.
>
>
>

-- 

--- 
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/groups/opt_out.


Reply via email to