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

>
> > Hmmm.... Looking at the code of  IS_IN_SET, I don't see why not...  am I
> > missing something?
>
> Because sets are unordered collections of unique elements (unordered
> is the keyword).
>
> Lets pass a set instead of a list:
> sushi_opts=set( ['yes', 'no','unknown'] )
>
> now if you display it you get:
> set(['unknown', 'yes', 'no' ])


well - for this kind of use case, you wouldn't WANT to use sets, but as far
as the class is concerned, it doesn't preclude it - should you want to use
them.

That's what I was thinking - that Iceberg's patch expands the scope and use
of IS_IN_SET()....  which you can (now) use sets, lists, or dicts with,
whichever is appropriate for your use case.

Cool!

>
>
> and now they will not match the label order (you get the wrong option
> for the label).
> >
>

--~--~---------~--~----~------------~-------~--~----~
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