Python's simplicity philosophy

Magnus Lie Hetland mlh at furu.idi.ntnu.no
Mon Nov 17 01:32:23 EST 2003


In article <61Ztb.3481$sb4.1708 at newsread2.news.pas.earthlink.net>,
Andrew Dalke wrote:
[snip]
>  - sort is a method on lists.  It only works on lists.  Unlike STL,
>     which distinguishes between a container and an algorithm, there
>     is no way to apply sort directly to anything which isn't a list.  Your
>     case (using sort on "a disk file or something") cannot occur.

Surely he was talking about implementing "list-alikes"...? I.e.
sequences polymorphically equivalent to lists, or at least wrt.
sequence-ness and sorting...? The stability requirement does make this
sort of thing a tad more difficult. (Not that I find it very
problematic; I'm just trying to interpret the meaning of the post.)

-- 
Magnus Lie Hetland                "In this house we obey the laws of
http://hetland.org                 thermodynamics!"    Homer Simpson




More information about the Python-list mailing list