Question about idioms for clearing a list
Ed Singleton
singletoned at gmail.com
Tue Feb 7 17:04:57 EST 2006
On 07/02/06, Fredrik Lundh <fredrik at pythonware.com> wrote:
> Bryan Olson wrote:
>
> > So is consistency; it ain't Perl, thank Guido.
>
> consistency is the hobgoblin of little minds.
>
> > Python now has, what, three built-in mutable collections types:
> > lists, dictionaries, and sets. Dicts and sets both have a clear()
> > method and lists do not.
>
> dicts and sets are mappings, and lists are not. mappings don't
> support slicing. lists do.
>
> are you sure you know Python ?
Is it obvious to a newbie what the difference between mappings and
"not-mappings", and is it obvious exactly what is and isn't a mapping?
Should it be necessary to "know" python before it becomes easy to use?
Ed
More information about the Python-list
mailing list