goto

rbt rbt at athop1.ath.vt.edu
Tue Jul 19 13:36:09 EDT 2005


On Wed, 2005-07-20 at 03:43 +1000, Steven D'Aprano wrote:
> On Tue, 19 Jul 2005 11:29:58 -0400, rbt wrote:
> 
> >> It should not really come as a shock that the same fellow who came up with a brilliant efficient way
> >> to generate all permutations (http://tinyurl.com/dnazs) is also in favor of goto.
> >> 
> >> Coming next from rbt: "Pointer arithmetic in python ?".
> >> 
> >> George
> >> 
> >> 
> > 
> > I have moments of brilliance and moments of ignorance. You must admit
> > though, that was a unique way of generating permutations... how many
> > other people would have thought of that approach? It did solve my
> > problem ;)
> 
> Sorry rbt, but your algorithm isn't unique, nor was it clever, and in fact
> your implementation wasn't very good even by the undemanding requirements
> of the algorithm. It is just a minor modification of bogosort (also known
> as "bozo-sort") algorithm:
> 
> http://en.wikipedia.org/wiki/Bogosort
> 
> I quote:
> 
> "...bogosort is 'the archetypal perversely awful algorithm', one example
> of which is attempting to sort a deck of cards by repeatedly throwing the
> deck in the air, picking the cards up at random, and then testing whether
> the cards are in sorted order."
> 
> Bogosort is nothing to be proud of, except as a joke.

It *was* a joke.




More information about the Python-list mailing list