Py2.3: Feedback on Sets

Terry Reedy tjreedy at
Fri Aug 15 17:50:14 CEST 2003

"Raymond Hettinger" <vze4rx4y at> wrote in message
news:3b__a.9694$u%2.7778 at
> "Istvan Albert"
> > > Then just by looking at the docs, it feels a little bit
confusing to
> > have discard() and remove() do essentially the same thing but only
> > of them raising an exception. Which one? I already forgot. I don't
> > which one I would prefer though.

I agree that this is confusing -- like having both str.find and
str.index.  I would prefer one delete function with an optional param
'silent' to switch its 'not there' response from the default (either
True or False, according to what seems to be the more common usage) to
the other choice.  (I know, I should have read draft more carefully
and commented last fall -- but this seems like the sort of redundancy
that Guido wants to remove in 3.0.)

Terry J. Reedy

More information about the Python-list mailing list