Re: sort functions in python

2008-02-10 Thread Jeff Schwab
Steven D'Aprano wrote: > On Sat, 09 Feb 2008 14:28:15 -0800, Jeff Schwab wrote: > >> Steven D'Aprano wrote: >>> On Sat, 09 Feb 2008 13:37:23 -0800, Jeff Schwab wrote: >>> Carl Banks wrote: > On Feb 8, 10:09 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> If you expect your data to be pr

Re: sort functions in python

2008-02-10 Thread Hrvoje Niksic
Steven D'Aprano <[EMAIL PROTECTED]> writes: >> I've never seen anything better than bubble sort being called >> bubble sort. > > What, you didn't read the post you're replying to? I responded to a specific point about combsort being called bubble sort. I agree that generally the line between "bu

Re: sort functions in python

2008-02-09 Thread Steven D'Aprano
On Sat, 09 Feb 2008 14:28:15 -0800, Jeff Schwab wrote: > Steven D'Aprano wrote: >> On Sat, 09 Feb 2008 13:37:23 -0800, Jeff Schwab wrote: >> >>> Carl Banks wrote: On Feb 8, 10:09 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > If you expect your data to be pretty nearly sorted already, but

Re: sort functions in python

2008-02-09 Thread Carl Banks
On Feb 9, 4:37 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Carl Banks wrote: > > On Feb 8, 10:09 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > >> If you expect your data to be pretty nearly sorted > >> already, but you just want to make sure (e.g. because a small number of > >> elements may have be

Re: sort functions in python

2008-02-09 Thread Steven D'Aprano
On Sat, 09 Feb 2008 23:07:44 +0100, Hrvoje Niksic wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> It depends on what you mean by "bubble sort". There are many different >> variations of bubble sort, that are sometimes described by names such >> as comb sort, cocktail sort, exchange sort

Re: sort functions in python

2008-02-09 Thread Jeff Schwab
Steven D'Aprano wrote: > On Sat, 09 Feb 2008 13:37:23 -0800, Jeff Schwab wrote: > >> Carl Banks wrote: >>> On Feb 8, 10:09 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: If you expect your data to be pretty nearly sorted already, but you just want to make sure (e.g. because a small number of

Re: sort functions in python

2008-02-09 Thread Hrvoje Niksic
Steven D'Aprano <[EMAIL PROTECTED]> writes: > It depends on what you mean by "bubble sort". There are many different > variations of bubble sort, that are sometimes described by names such as > comb sort, cocktail sort, exchange sort, and sometimes merely referred to > bubble sort. I've never

Re: sort functions in python

2008-02-09 Thread Steven D'Aprano
On Sat, 09 Feb 2008 13:37:23 -0800, Jeff Schwab wrote: > Carl Banks wrote: >> On Feb 8, 10:09 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: >>> If you expect your data to be pretty nearly sorted already, but you >>> just want to make sure (e.g. because a small number of elements may >>> have been ins

Re: sort functions in python

2008-02-09 Thread Jeff Schwab
Carl Banks wrote: > On Feb 8, 10:09 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> If you expect your data to be pretty nearly sorted >> already, but you just want to make sure (e.g. because a small number of >> elements may have been inserted or removed since the last sort), >> bubble-sort is a goo

Re: sort functions in python

2008-02-09 Thread Jeff Schwab
Steven D'Aprano wrote: > On Fri, 08 Feb 2008 19:09:06 -0800, Jeff Schwab wrote: > >> Steven D'Aprano wrote: >>> On Fri, 08 Feb 2008 17:00:27 -0800, t3chn0n3rd wrote: >>> Do you think it is relatively easy to write sort algorithms such as the common Bubble sort in Python as compared to ot

Re: sort functions in python

2008-02-09 Thread Steven D'Aprano
On Fri, 08 Feb 2008 19:09:06 -0800, Jeff Schwab wrote: > Steven D'Aprano wrote: >> On Fri, 08 Feb 2008 17:00:27 -0800, t3chn0n3rd wrote: >> >>> Do you think it is relatively easy to write sort algorithms such as >>> the common Bubble sort in Python as compared to other high level >>> programming

Re: sort functions in python

2008-02-08 Thread Carl Banks
On Feb 8, 10:09 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > If you expect your data to be pretty nearly sorted > already, but you just want to make sure (e.g. because a small number of > elements may have been inserted or removed since the last sort), > bubble-sort is a good choice. But if you're

Re: sort functions in python

2008-02-08 Thread Paddy
On 9 Feb, 01:00, t3chn0n3rd <[EMAIL PROTECTED]> wrote: > Do you think it is relatively easy to write sort algorithms such as > the common Bubble sort in Python as compared to other high level > programming langauges Hi, >From a quick google, you could compare the sources here: http://www.daniweb.c

Re: sort functions in python

2008-02-08 Thread Jeff Schwab
Steven D'Aprano wrote: > On Fri, 08 Feb 2008 17:00:27 -0800, t3chn0n3rd wrote: > >> Do you think it is relatively easy to write sort algorithms such as the >> common Bubble sort in Python as compared to other high level programming >> langauges > > > You realise that bubble sort is one of the wo

Re: sort functions in python

2008-02-08 Thread Steven D'Aprano
On Fri, 08 Feb 2008 17:00:27 -0800, t3chn0n3rd wrote: > Do you think it is relatively easy to write sort algorithms such as the > common Bubble sort in Python as compared to other high level programming > langauges You realise that bubble sort is one of the worst possible sort algorithms possib

Re: sort functions in python

2008-02-08 Thread Jeff Schwab
t3chn0n3rd wrote: > Do you think it is relatively easy to write sort algorithms such as > the common Bubble sort in Python as compared to other high level > programming langauges http://www.codecodex.com/wiki/index.php?title=Bubble_sort -- http://mail.python.org/mailman/listinfo/python-list

Re: sort functions in python

2008-02-08 Thread Michael Spencer
t3chn0n3rd wrote: > Do you think it is relatively easy to write sort algorithms such as > the common Bubble sort in Python as compared to other high level > programming langauges yes -- http://mail.python.org/mailman/listinfo/python-list

sort functions in python

2008-02-08 Thread t3chn0n3rd
Do you think it is relatively easy to write sort algorithms such as the common Bubble sort in Python as compared to other high level programming langauges -- http://mail.python.org/mailman/listinfo/python-list