Python's simplicity philosophy

Curt curty at freeze.invalid
Fri Nov 21 06:46:44 EST 2003


Erik Max Francis <max at alcyone.com> writes:

> The tweak I made to your sample file wasn't sorted.  It just had two
> identical adjacent lines.  The modified sample again was:

> max at oxygen:~/tmp% cat > uniq.txt
> flirty
> curty
> curty
> flirty
> ^D
> max at oxygen:~/tmp% uniq uniq.txt
> flirty
> curty
> flirty

> You don't really think the sequence [flirty, curty, curty, flirty] is
> sorted, do you?

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).  You segregated the item "curty" into a group
and therefore sorted the file by what we will now refer to as the
"curty criterion".  That you didn't apply the "flirty criterion" to
your sort (or simply apply an alphabetical criterion) does not
demonstrate anything other than your cleverly disguised reticence to
employ the "sort" command.  ;-)




More information about the Python-list mailing list