Python's simplicity philosophy
Ben Finney
bignose-hates-spam at and-benfinney-does-too.id.au
Wed Nov 19 20:15:15 EST 2003
On 19 Nov 2003 17:20:10 -0800, Paul Rubin wrote:
> "A.M. Kuchling" <amk at amk.ca> writes:
>> [the Unix command] uniq doesn't report an error if its input isn't
>> sorted.
>
> Maybe it should. If its behavior on unsorted input isn't specified,
> you shouldn't assume it will act in any particular way.
The specification on the man page for GNU uniq seems clear on this:
DESCRIPTION
Discard all but one of successive identical lines from INPUT
(or standard input), writing to OUTPUT (or standard output).
It doesn't care if the input is sorted or unsorted; it describes
behaviour on successive identical lines, not the total set of all lines.
--
\ "The Bermuda Triangle got tired of warm weather. It moved to |
`\ Alaska. Now Santa Claus is missing." -- Steven Wright |
_o__) |
Ben Finney <http://bignose.squidly.org/>
More information about the Python-list
mailing list