On Tue, Jun 17, 2008 at 7:48 PM, Shannon -jj Behrens <[EMAIL PROTECTED]> wrote:
> On Tue, Jun 17, 2008 at 2:52 PM, Mike Orr <[EMAIL PROTECTED]> wrote:
>> The option order in webhelpers.html.tags.select() has changed from
>> [(label, value)] to [(value, label)].  This matches most real-world
>> lists including dict.items() where the dict is {id : label}.  It's the
>> opposite of the old rails helper options_for_select(), however.
>>
>> There are tradeoffs both ways.  Now to display lables alphabetically
>> you have to do:
>>    sorted(my_options, key=lambda x: x[1])
>>
>> However, I was finding that the other order causes way too many:
>>    [(x[1], x[0]) for x in some_list]
>
> I fear that this is too likely to cause weird bugs for people.
> Perhaps you should create a new method name.  You can have the old one
> defined in terms of the new, and then deprecate it.

Perhaps I misread your email.  You're creating a new API, not
refactoring an existing API, right?  If so, then please disregard my
comment.

-jj

-- 
I, for one, welcome our new Facebook overlords!
http://jjinux.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to