Comment on Draft Pep ver 4 -- Psuedo Deprecations of Builtins
Alex Martelli
aleax at aleax.it
Wed May 1 16:25:46 EDT 2002
Jeff Epler wrote:
> On Wed, May 01, 2002 at 05:37:31PM +0000, Huaiyu Zhu wrote:
>> The example above was only meant to show that what John wanted can be
>> achieved without apply. But of course apply does more than that.
>
> What "more" does apply do? Is this not a complete implementation of
> 'apply' that works in any recent version of Python?
>
> def myapply(func, args, kw):
> func(*args, **kw)
Not quite -- "def apply(f, a, k): return f(*a,**k)" is a bit better (right
name, necessary return statement).
Alex
More information about the Python-list
mailing list