Using 'apply' as a decorator, to define constants

Jan Kaliszewski zuo at chopin.edu.pl
Sat Aug 22 16:11:20 EDT 2009


21-08-2009 o 18:09:02 alex23 <wuwei23 at gmail.com> wrote:

> Unfortunately, apply() has been removed as a built-in in 3.x.

You can always implement it yourself :)

     def apply(function, args=(), keywords={}):
         return function(*args, **keywords)

-- 
Jan Kaliszewski (zuo) <zuo at chopin.edu.pl>



More information about the Python-list mailing list