[Python-3000] Removing functions from the operator module

Guido van Rossum guido at python.org
Thu Mar 8 01:38:01 CET 2007


On 3/7/07, Collin Winter <collinw at gmail.com> wrote:
> On 7/13/06, Collin Winter <collinw at gmail.com> wrote:
> > On 7/3/06, Collin Winter <collinw at gmail.com> wrote:
> > > On 7/3/06, Guido van Rossum <guido at python.org> wrote:
> > > > It turns out I was misled by Collin's claim that the PEP wants
> > > > isCallable and sequenceIncludes removed "because there are better,
> > > > more obvious ways to spell these things." He must have made up the
> > > > motivation, as the PEP doesn't give any.
> > >
> > > I was inferring that motivation <snip>
> >
> > So that others don't have to infer in the future, I've posted patch
> > #1522038, which adds an explanation as to why these items are being
> > removed.

(And this was checked in. I agree for sequenceIncludes which should be
spelled as operator.contains. I guess operator.callable can go when
callable goes.)

> > Also, in case you (Guido) have changed your mind about removing
> > operator.truth and operator.abs, I've also posted patch #1522059 which
> > will remove them from the stdlib.
>
> I had forgotten I had posted this patch...
>
> I don't suppose you've changed your mind about removing operator.truth
> and operator.abs in the seven months since this discussion?

No, though I think that operator.truth should be renamed to operator.bool.

I like the idea that for each built-in op there's a callable in operator.

--
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list