Python's simplicity philosophy

Curt curty at freeze.invalid
Sat Nov 22 12:02:46 EST 2003


On Fri, 21 Nov 2003 13:52:45 -0800, Erik Max Francis wrote:

> Curt wrote:
 
> > Well, you did do _something_ to the sample for which you fail to find
> > a more descriptive word than "tweak".  I certainly do think that the
> > proper word for the modified sample is "sorted"; yes, you sorted the
> > file on the word "curty", by which I mean that you performed "an
> > operation that segregates items into groups according to a specified
> > criterion" (WordNet).
 
> It seems at this point you're conceding that the file is not globally
> sorted, and so retracting your original claim.  If uniq does something

My original demonstration removed _all_ the duplicates.  To remove all
the duplicates from my sample with "uniq", it must be sorted in either 
ascending or descending alphabetical order.

My sample file in its modified state is not "globally sorted", but it is 
partially sorted (the one implies the other, I'm afraid), and "uniq" worked 
solely on that part of the file which you "tweaked" in this way. Seems okay 
to me!     

> meaningful and predictable, according to its documentation, on
> non-sorted text, then obviously it does not require sorted input as you
> once claimed.  All despite your goalpost shifting.

I haven't shifted goalposts, whatever that means.  You shifted the
emphasis of my example by removing only one of the duplicates.

I concede that "uniq" does something "meaningful" on unsorted input, if
that input contains identical, successive lines.  I do not concede,
however, that you may never be required to sort its input in order to
arrive at that state, which is exactly what my demonstration "proved".

If I've just shifted goalposts, well, you can all shoot me at dawn, if
you feel it's a capital offense.  Don't worry, we'll give you the real
bullet.   





More information about the Python-list mailing list