A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2007-March/071738.html below:

[Python-3000] Removing functions from the operator module

[Python-Dev] Fwd: Re: [Python-3000] Removing functions from the operator module [Python-Dev] Fwd: Re: [Python-3000] Removing functions from the operator moduleCollin Winter collinw at gmail.com
Thu Mar 8 06:53:45 CET 2007
On 3/7/07, Raymond Hettinger <python at rcn.com> wrote:
> [Collin Winter]
> >> I don't suppose you've changed your mind about removing operator.truth
> >> and operator.abs in the seven months since this discussion?
>
> [GvR]
> >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.
>
> It makes sense to me that built-in ops like + have a corresponding operator function like operator.__add__(), but I don't follow how this logic applies to abs() and bool().  ISTM, operator.bool and operator.abs would not add any value beyond what is already provided by __builtin__.bool and __builtin__.abs.
>

FWIW, I've always thought of the operator module as a place to look
when I need to pass some bit of syntax (eg., attribute lookup, "in",
addition) to a higher-order function. bool() and abs() aren't syntax,
so I would never look in operator.

Collin Winter
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4