Re: Py2.3: Feedback on Sets
"Raymond Hettinger" <vze4rx4y@veriz on.net> wrote in message
news:3b__a.9694 $u%2.7778@nwrdn y02.gnilink.net ...[color=blue]
> "Istvan Albert"[color=green][color=darkred]
> > > Then just by looking at the docs, it feels a little bit[/color][/color][/color]
confusing to[color=blue][color=green]
> > have discard() and remove() do essentially the same thing but only[/color][/color]
one[color=blue][color=green]
> > of them raising an exception. Which one? I already forgot. I don't[/color][/color]
know[color=blue][color=green]
> > which one I would prefer though.[/color][/color]
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
"Raymond Hettinger" <vze4rx4y@veriz on.net> wrote in message
news:3b__a.9694 $u%2.7778@nwrdn y02.gnilink.net ...[color=blue]
> "Istvan Albert"[color=green][color=darkred]
> > > Then just by looking at the docs, it feels a little bit[/color][/color][/color]
confusing to[color=blue][color=green]
> > have discard() and remove() do essentially the same thing but only[/color][/color]
one[color=blue][color=green]
> > of them raising an exception. Which one? I already forgot. I don't[/color][/color]
know[color=blue][color=green]
> > which one I would prefer though.[/color][/color]
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
Comment