del and sets proposal
Carl Banks
pavlovevidence at gmail.com
Fri Oct 3 05:18:53 EDT 2008
On Oct 2, 11:27 pm, Larry Bates <larry.ba... at vitalEsafe.com> wrote:
> I didn't mean to imply that del a[1] would delete the first thing in the set,
> but rather the item with a value of 1. Just as when we use it on a dictionary:
>
> del a[1]
>
> doesn't mean delete the first dictionary entry but rather delete the entry in
> the object with a value of 1, which IMHO would be perfectly logical for a set
> (which is why I started this discussion).
It's not logical at all. In all current uses of del, the thing that
follows del is a valid expression. With sets, that's not the case.
Carl Banks
More information about the Python-list
mailing list