Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> wrote:

>Abdulaziz Ghuloum <[EMAIL PROTECTED]> writes:
>
>> Python FAQs contain an entry to the schwartzian transform.
>>
>> http://www.python.org/doc/faq/programming.html#i-want-to-do-a-complicated-sort-can-you-do-a-schwartzian-transform-in-python
>
>This entry is obsolete: it should mention the 'key' option of the
>standard sort method.

It should mention it, but not necessarily recommend it.

I haven't run the numbers in Python, but in Perl, the undecorated sort is
so well-optimized that the Schwartzian transform is almost always faster
than passing a custom comparator to the sort function.
-- 
- Tim Roberts, [EMAIL PROTECTED]
  Providenza & Boekelheide, Inc.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to