A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-May/035311.html below:

[Python-Dev] Distutils using apply

[Python-Dev] Distutils using applyGuido van Rossum guido@python.org
Mon, 05 May 2003 08:02:08 -0400
> Could someone please explain why apply() was marked deprecated ?

Becase it's more readable, more efficient, and more flexible to write
f(x, y, *t) than apply(f, (x, y) + t).

> The only reference I can find is in PEP 290 and that merely
> reports this "fact".
> 
> I'm -1 on deprecating apply(). Not only because it introduces yet
> another incompatiblity between Python versions, but also because it
> is still useful in the context of having a function which mimics
> a function call, e.g. for map() and other instance where you
> pass around functions as operators.

Then maybe we should add something like operator.__call__.

OTOH, you're lucky that map isn't deprecated yet in favor of list
comprehensions; I expect that Python 3.0 won't have map or filter
either.

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



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