On Fri, Dec 19, 2008 at 1:50 PM, DenesL <[email protected]> wrote:

> ...
> You can use:
>
> ...=IS_IN_SET(  ['yes', 'no','unknown'],
>  labels=['Like it? I love it!','Come on, Sushi sucks!','What is
> Sushi?'] )
>
> or in a reusable fashion:
>
> sushi_opts= ['yes', 'no','unknown']
> sushi_labels=['Like it? I love it!','Come on, Sushi sucks!','What is
> Sushi?']
> ...
> ...=IS_IN_SET( sushi_opts, sushi_labels )
>

nice....  but I still like the dict form better...

>
> > SQLField('do_you_like_sushi','text',requires=IS_IN_SET(
> >   {'yes': 'Like it? I love it!',
> >   'no': 'Come on, Sushi sucks!',
> >   'unknown': 'What is Sushi?' }
> >   ))
>
> But this looks nice and it seems that even though theset can be either
> a dict or a list the attribute ('theset') is not used for  operations
> anywhere else in gluon.



>
> The proposal, however,  does not address the support for sets, you CAN
> NOT use sets with IS_IN_SET.


Hmmm.... Looking at the code of  IS_IN_SET, I don't see why not...  am I
missing something?


>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to