generator expressions: performance anomaly?
stephen.thorne at gmail.com
Wed Jan 19 08:04:45 CET 2005
On Tue, 18 Jan 2005 23:09:57 -0700, Steven Bethard
<steven.bethard at gmail.com> wrote:
> @with_consts(i=1, deftime=time.ctime())
> def foo(x, y=123, *args, **kw):
> return x*y, kw.get('which_time')=='now' and time.ctime() or deftime
> Then you don't have to mix parameter declarations with locals definitions.
>  I have no idea how implementable such a decorator would be. I'd
> just like to see function constants declared separate from arguments
> since they mean such different things.
def closure(*arg, **kwargs):
return f(*arg, **kwargs)
More information about the Python-list