Question about idioms for clearing a list

Aahz aahz at pythoncraft.com
Tue Feb 7 16:48:35 EST 2006


In article <mailman.1567.1139348019.27775.python-list at python.org>,
Fredrik Lundh <fredrik at pythonware.com> wrote:
>
>dicts and sets are mappings, and lists are not.  mappings don't
>support slicing.  lists do.
>
>are you sure you know Python ?

Actually, after spending some time thinking about this, I've decided
that sets are *not* mappings.  I believe that a mapping should support
__getitem__(); in addition, sets do not consist of key/value pairs like
any other mapping.

(Just to be clear, I do agree with your basic point; I'm nitpicking on a
tangent.)
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"19. A language that doesn't affect the way you think about programming,
is not worth knowing."  --Alan Perlis



More information about the Python-list mailing list