Python's simplicity philosophy

Erik Max Francis max at alcyone.com
Thu Nov 20 03:00:05 CET 2003


Aahz wrote:

> Huh?!?!  uniq has always to my knowledge only worked on sorted input.
> Reading the man page on two different systems confirms my knowledge.

uniq doesn't care whether the input is sorted or not.  All it does is
collapse multiple consecutive duplicate lines into a single line.  Using
uniq in conjunction with sort is certainly a common mode, but it's
hardly required.

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ 
\__/ There are no dull subjects. There are only dull writers.
    -- H.L. Mencken




More information about the Python-list mailing list