Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #48369

Re: Timsort in Cpython

From Robert Kern <robert.kern@gmail.com>
Subject Re: Timsort in Cpython
Date 2013-06-15 21:55 +0100
References <9ca984d5-19d9-4e82-a305-2a2f5ee341fe@googlegroups.com> <21a6a262-765b-4771-809e-56a9808d9cf9@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.3408.1371329739.3114.python-list@python.org> (permalink)

Show all headers | View raw


On 2013-06-15 21:21, alphonse23@gmail.com wrote:
> Hey guys,
> Thanks for the quick reply! So why did they decide to call it listsort in the source instead? Why didn't they keep it as Timsort?

This was the first implementation of the algorithm. The algorithm was only 
colloquially named "Timsort" after it was used in Python.

This the naming convention for the C implementation of builtin types' methods in 
the Python codebase. The C implementation listsort() corresponds with the Python 
method list.sort(). Similarly, listappend() is list.append(), listpop() is 
list.pop(), etc. C.f.

http://hg.python.org/cpython/file/default/Objects/listobject.c#l2362

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Timsort in Cpython alphonse23@gmail.com - 2013-06-15 12:44 -0700
  Re: Timsort in Cpython Zachary Ware <zachary.ware+pylist@gmail.com> - 2013-06-15 14:55 -0500
  Re: Timsort in Cpython Robert Kern <robert.kern@gmail.com> - 2013-06-15 21:00 +0100
  Re: Timsort in Cpython alphonse23@gmail.com - 2013-06-15 13:21 -0700
    Re: Timsort in Cpython Robert Kern <robert.kern@gmail.com> - 2013-06-15 21:55 +0100
      Re: Timsort in Cpython alphonse23@gmail.com - 2013-06-15 14:43 -0700
    Re: Timsort in Cpython Terry Reedy <tjreedy@udel.edu> - 2013-06-15 22:56 -0400
  Re: Timsort in Cpython alphonse23@gmail.com - 2013-06-15 21:05 -0700
    Re: Timsort in Cpython mm0fmf <none@mailinator.com> - 2013-06-16 14:08 +0100
      Re: Timsort in Cpython alphonse23@gmail.com - 2013-06-16 09:15 -0700
        Re: Timsort in Cpython Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-06-16 16:16 -0400
          Re: Timsort in Cpython sean.westfall@gmail.com - 2013-06-19 10:10 -0700
    Re: Timsort in Cpython Ian Kelly <ian.g.kelly@gmail.com> - 2013-06-16 14:33 -0600
      Re: Timsort in Cpython sean.westfall@gmail.com - 2013-06-19 10:18 -0700
        Re: Timsort in Cpython Ian Kelly <ian.g.kelly@gmail.com> - 2013-06-19 12:20 -0600

csiph-web